c# - Parsing Friendly Routed URL Parameter -


i have links in listview going detailed page view (not mvc):

http://localhost/mysite/events.aspx?eventid=14 

after implementing routing, link in form:

http://localhost/mysite/events/14 

what's best way parse/obtain eventid value in events.aspx code-behind , how should/would check make sure value passed?

i figured out , leaving question others refer to:

if (!page.ispostback) {     if (page.routedata.values["eventid"] != null)     {         int eventid = convert.toint32(page.routedata.values["eventid"]);     } } 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -