Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
385 Points
203 Posts
Apr 14, 2012 02:03 AM|LINK
Are you using Routing if so make a link like this this Route you use the department ID to select all of the categories in this departement
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl ='<%#"/department/"+ Eval("DepartmentNameUrl")+"/"+Eval("DepartmentID") %>'><%# Eval("Name") %></asp:HyperLink>
here is the Route with regex validation
void RegisterRoutes (System.Web.Routing.RouteCollection routes) { routes.MapPageRoute("Departments", "department/{name}/{Id}", "~/Department.aspx",true , new RouteValueDictionary { { "Id", "[0-9]{1,8}" } }); {
Remember to Register your routes in the application start in the global.ascx file
void Application_Start(object sender, EventArgs e) { RegisterRoutes(System.Web.Routing.RouteTable.Routes); }
These tutorials are a good place to start
http://www.asp.net/web-forms/overview/routing
rickj1
Member
385 Points
203 Posts
Re: Access database with ListView, Want to send item clicked to another page.
Apr 14, 2012 02:03 AM|LINK
Are you using Routing if so make a link like this this Route you use the department ID to select all of the categories in this departement
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl ='<%#"/department/"+ Eval("DepartmentNameUrl")+"/"+Eval("DepartmentID") %>'><%# Eval("Name") %></asp:HyperLink>here is the Route with regex validation
void RegisterRoutes (System.Web.Routing.RouteCollection routes) { routes.MapPageRoute("Departments", "department/{name}/{Id}", "~/Department.aspx",true , new RouteValueDictionary { { "Id", "[0-9]{1,8}" } }); {Remember to Register your routes in the application start in the global.ascx file
void Application_Start(object sender, EventArgs e) { RegisterRoutes(System.Web.Routing.RouteTable.Routes); }These tutorials are a good place to start
http://www.asp.net/web-forms/overview/routing
www.barterlinks.net