Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've been wondering some sites who uses asp.net have just one single page

 

like main.aspx, that's it, and they use query strings like ?page=about

 

my question is, how do u implement this in asp.net and how does it work in general, like is it just one .aspx file ur dealing with and u populate the page based on what the query string is? :S... like is this a feasible way of implementing i mean what about static contents which remain the same at times, for example the about page or contact page.

 

Wouldn't you have a big switch/case statement?

 

select case page

 

case "about"

'dynamically load contents..

 

end select

 

is that how it works?

 

please give me some insigt into this way of implementing sites, thank you :)

Posted

Yes, you could do a big select case, or you could pass in a ID, such as

 

page.aspx?id=1

 

And you store this ID in a db with its contents. You are correct, page.aspx is just one page thaty dynamically serves up content based on varying paramters(querystrings). The source of the content is up to you, text files, inline code, database. If your content does not change much, think about generateing static pages instead of processing a request everytime. Also, some search engines dont like the ? and will chop off any paramters after that, so your site wont be as visible when it comes to spidering.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...