Click here to Skip to main content
16,020,249 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI All

Please Help me,

I have a problem with url routing with query string.

Global.asax code

RouteTable.Routes.Add("Mycity", new Route("Mycity/{cityname}", new PageRouteHandler("~/Default.aspx")));


default.aspx code

XML
<asp:HyperLink ID="HyperLink1" runat="server"  NavigateUrl='<%$RouteUrl:RouteName=Mycity,cityname=Eval("cityname")%>'>

city_name is sqldata table coulmn name
Eval(&quot;city_name&quot;)</pre>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900