این ارور ور میده
The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /Service/1/ewr/
public static void RegisterRoutes(RouteCollection routes) { routes.MapPageRoute( "Service" , "Service/{ID}/{ProductTitle}" , "~/Service.aspx" ); } void Application_Start( object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); }
<asp:HyperLink ID= "HyperLink2" runat= "server" NavigateUrl= '<%# string.Format("/Service/{0}/{1}", Eval("ProductID") ,Eval("ProductTitle").ToString().Replace(" ", "-")) %>' />
protected void LinqDataSource1_Selecting( object sender, LinqDataSourceSelectEventArgs e) { int ID = int .Parse(Page.RouteData.Values[ "ID" ].ToString()); e.Result = db.Product.Where(p => p.ProductID == ID).FirstOrDefault(); }