23 Jun 2009 @ 7:08 AM 
 

Generate Page URL Name for CMS, Blogs Application

 

Hi All,

To give the Name to the Page can be handeled by many ways like

Using GUID (Issue- Cant identify exactly while browsing through pages)
Using Session (Issue-Same as above)
Using Page Title provided in Text Field (We will see this)
We are going to implement the scenario 3. We will first see what are our constraints for page url name.

It should be only Alphanumeric enabled like – About-Us.aspx
No other character should include in the page name like – %,@,$ etc
Its just about Regular Expression to identify the alphanumeric characters. The reqular expression is in System.Text.RegularExpressions namespace.

Regex.Replace(strInput, “[^\\w]“, “”);

If you give the page Title to – About % US #$ output will be AboutUs.aspx

Happy Coding :)

Tags Categories: ASP.Net, Articles Posted By: admin
Last Edit: 10 Oct 2009 @ 11 03 AM

EmailPermalink
 

Responses to this post » (8 Total)

 
  1. ka-blogs says:

    Thank you for sharing with us the different ways to give the Name to the Page.

  2. Autolloth says:

    winsome answers i like it

  3. System Forex says:

    I somehow dont agree with a few things, but its great anyways.

  4. Good Day!!! http://www.pritambaldota.com is one of the best informational websites of its kind. I take advantage of reading it every day. Keep it that way.

  5. optockoum says:

    Thankz for the info!

  6. Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!

  7. eximePram says:

    likeable answers i like it

  8. personal loans for bad credit says:

    I am to a great extent impressed with the article I have just read. I wish the author of http://www.pritambaldota.com can continue to provide so much useful information and unforgettable experience to http://www.pritambaldota.com readers. There is not much to tell except the following universal truth: triangular sandwiches always taste better I will be back.

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

\/ More Options ...
Change Theme...
  • Users » 1
  • Posts/Pages » 8
  • Comments » 24
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About Me



    No Child Pages.

Open Source



    No Child Pages.