sub-folders?
-
hi. i am a web development student and would like to put some of what i have learnt to good use. i'm thinking a photography portfolio on the lines of http://www.deviantart.com (i'm not looking to compete but to practice). now i find it easy to code this using queries in the address bar (such as: www.someip.com/view.aspx?user=manti in order to view the user page of "manti") but i would like something more challenging... something like www.someip.com/manti -- thinking along the lines of myspace here. but i have no idea how i should go around this! what i have thought about was: a. user registers with username "manti" b. new sub-folder in the web's directory called "manti" (this can be accessed through the web using www.someip.com/manti) c. copy a default default.aspx page which is filled at runtime by the server with code-behind to show all required information (such as gallery or whatever) into the new subfolder is this a good way of doing it? any better ones? i'm open to suggestions. PS: my biggest problem here is: the code behind will still need what username i am viewing in order to retrieve the data from the database (something like getImageList(username)). how can i read the username with my method -- or yours ;) -- since it's not in the address bar as a query? Thanks a lot for your time,
m4nti
==========
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book) -
hi. i am a web development student and would like to put some of what i have learnt to good use. i'm thinking a photography portfolio on the lines of http://www.deviantart.com (i'm not looking to compete but to practice). now i find it easy to code this using queries in the address bar (such as: www.someip.com/view.aspx?user=manti in order to view the user page of "manti") but i would like something more challenging... something like www.someip.com/manti -- thinking along the lines of myspace here. but i have no idea how i should go around this! what i have thought about was: a. user registers with username "manti" b. new sub-folder in the web's directory called "manti" (this can be accessed through the web using www.someip.com/manti) c. copy a default default.aspx page which is filled at runtime by the server with code-behind to show all required information (such as gallery or whatever) into the new subfolder is this a good way of doing it? any better ones? i'm open to suggestions. PS: my biggest problem here is: the code behind will still need what username i am viewing in order to retrieve the data from the database (something like getImageList(username)). how can i read the username with my method -- or yours ;) -- since it's not in the address bar as a query? Thanks a lot for your time,
m4nti
==========
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)il_manti wrote:
PS: my biggest problem here is: the code behind will still need what username i am viewing in order to retrieve the data from the database (something like getImageList(username)). how can i read the username with my method -- or yours -- since it's not in the address bar as a query?
The form method you are familiar with is called
"get"
, where the browser passes the variable data along by appending a '?
' followed by thevariable name
, an '=
' and thevariable data
to the target url. Multiple variables are seperated by an ampersand (&
). i.e.user_reply.asp?forumid=12076&main=/script/comments/forums.asp&select=1798826
It's a quick way to pass information and the model also allows you to create dynamic links (which you will no doubt need in your project). Another method you might remember or have seen at least once is "post
".Post
is often used to transmit more sensitive information such as login names and passwords, birthdates and credit card information which should not be visible to the user. It is adviseable to use this method when working with a secure connection, or when transmitting a large string such as this paragraph. It may also help prevent SQL injection. A variable passed using "post" is not displayed in the url, but may be used in much the same way. If you are looking for a cleaner look you may use this method, but you should also consider the fact that you must balance functionality and SEO. Search engines might not be able to effectively crawl a site that uses a "post
" form method as a means of navigation, unless you include an xml sitemap that is constantly updated as new directories are created. Roswell"Angelinos -- excuse me. There will be civility today."
Antonio VillaRaigosa
City Mayor, Los Angeles, CA