hi
I have 3 page that use url routing for it
1-default.aspx
2-phonebook.aspx
3-Estate.aspx
in default.aspx define linkbutton that when users click on it, it will redirect to phonebook.aspx below is code:
protected void LinkbtnDes_Click(object sender, EventArgs e)
{
LinkButton ImgEdit = (LinkButton)sender;
Response.Redirect("../phone/" + ImgEdit.CommandArgument);
}
//and global.asax
static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("phone", "phone/{id}", "~/amlak/phonebook.aspx");
routes.MapPageRoute("Estate", "Estate/{id}", "~/amlak/ Estate.aspx");
}
//now in phonebook.aspx I put other linkbutton that when users click on it it will redirect to Estate.aspx
protected void LinkbtnDes_Click(object sender, EventArgs e)
{
LinkButton ImgEdit = (LinkButton)sender;
Response.Redirect("../Estate/" + ImgEdit.CommandArgument);
}
now wproblem is here in phonebook.aspx when I click linkbutton to go to estate.aspx it make this error:
Server Error in '/' Application.
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: /Estate/8
Version Information: Microsoft .NET Framework Ver
best regards
neda