Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 5th, 2007, 06:30 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page and URL Structure

Hello Everyone and thanks for your help in advance. I am developing a content management site and need some feedback on how to structure the site layout. Typically, when I have developed any site, I have utilized on default page and then dynamically change the page via querystring parameters and dynamically loading contnrols. For example, Default.aspx?category=products&productID=5

However, this is obviously not good for search engines and, from my understanding, the better way would be to use some type of URL Rewrite to parse a URL like /Products/5.aspx. However, this would seem to imply that I would need more than one page to redirect to. Can someone give me some feedback on the best practices of accomplishing this. Obviously, the reason I am trying to use one default page is to simplify maintenance. Any feedback would be greatly appreciated. Thanks.

  #2 (permalink)  
Old October 7th, 2007, 12:27 AM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I'm not privy to a lot of ins and outs of SEO with database applications, but I may be able to speak to part of this. You're trying to use one page to simplify maintenance. So you're nervous about having a number of different pages in various folders, is this correct?

IF I'm understanding the problem correctly, there are a couple things I know of that could help. One, you know how when you create a new webform, it lists the name of the partial class (usually the same as the filename you created). Swap the default out for a base page class object. One that will let you reuse the same .cs file for every page that you're building. That would be one thing to help maintain consistency across any number of pages AND be able to change the behavior on all pages by updating one code behind.

Two, check out master pages. I admit, I'm only just starting to work with them myself, but the idea is very attractive. It's essentially SSI that's compiled into the page so that it doesn't require the server hit SSI takes. It lets you design an interface for any number of pages, implement it as a user control, and change ALL pages by making changes to the one master page. If you use CSS, which granted .NET does not make easy, you can control the page interface from the master page, the programming logic, from the base page code behind, and the appearance from the CSS stylesheet. That's pretty cool.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
  #3 (permalink)  
Old October 7th, 2007, 07:56 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

As chroniclemaster1 pointed out, master pages is a major step to making maintenance easier.

Even with URL rewriting you could technically still use the single page technique. The difference is that the querystring detail that defines that one page's behavior is masked from the user by the URL before it's re-written. You are simply re-writing it to the URL you currently use.

Despite this, with master pages and the use of super classes for your pages I think the headache of a one-page-site is easily avoidable.

-Peter
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stop master page from url encoding solos ASP.NET 2.0 Basics 2 May 16th, 2008 12:37 PM
how do i remove the page/filename from my URL? panuvin ASP.NET 2.0 Basics 2 September 21st, 2007 09:12 AM
Page redirect based on URL somnath.kartic ASP.NET 1.0 and 1.1 Basics 0 April 3rd, 2006 04:45 AM
How to hide Extension of Page in URL ? savan_thakkar ASP.NET 1.0 and 1.1 Professional 9 February 24th, 2006 10:31 AM



All times are GMT -4. The time now is 05:44 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.