TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abdul Amin Khan
1.1k
603
21.1k
#DivName not supporting in URL Rewriting/Routing
Feb 21 2017 2:06 AM
Dear All,
Anyone can help me on this,
There is showing resource not found in URL rewriting/Routing when i use #DivName in url
but this url is working fine directly.
Given Code when i use MainPage it is working fine but when we use App/ or Contact-Us/ it is showing resource not found.
Please clear where i am wrong in this code.
<%@ Application Language="C#" %>
<%@ Import Namespace="System.Web.Routing" %>
<script RunAt="server">
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
RegisterRoute(System.Web.Routing.RouteTable.Routes);
}
void Album4lifeRoute(System.Web.Routing.RouteCollection route)
{
route.MapPageRoute("HomePage", "mainpage/", "~/Index.aspx");
route.MapPageRoute("AppPage", "App/", "~/Index.aspx/AppName");
route.MapPageRoute("ContactUs", "contact-us/", "~/Index.aspx#ContactUs");
}
void Application_End(object sender, EventArgs e)
{
// Code that runs on application shutdown
}
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
}
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
}
void Session_End(object sender, EventArgs e)
{
// Code that runs when a session ends.
// Note: The Session_End event is raised only when the sessionstate mode
// is set to InProc in the Web.config file. If session mode is set to StateServer
// or SQLServer, the event is not raised.
}
</script>
Reply
Answers (
2
)
Null Reference Exception while giving image path in c# file
client side validation in asp.net using javascript