MVC 4 and WebForm Application: # symbol is appearing in URL
-
I have a MVC 4 application which I've added some administrative pages implemented as WebForms. The application starts on the Home controller, Index view, where I have a link to one of my Admin pages.
<a href="~/AdminUtils/WebForm1.aspx" title="Form 1">Webform1 Here </a>
The link works correctly because my page is redirected to the Webform1.aspx page. The problem is that the resulting URL I see in my browser is: http://localhost:63163/#/AdminUtils/WebForm1.aspx[^] Notice that there is a # (hash) symbol in the URL. The problem I'm having is that I have a 3rd party Grid on that page which is not operating correctly. If I manually change the URL to remove the # symbol, then the grid works perfectly. Anybody know why this # symbol is showing up in my URL ? How can I get rid of it ? Thanks.
-
I have a MVC 4 application which I've added some administrative pages implemented as WebForms. The application starts on the Home controller, Index view, where I have a link to one of my Admin pages.
<a href="~/AdminUtils/WebForm1.aspx" title="Form 1">Webform1 Here </a>
The link works correctly because my page is redirected to the Webform1.aspx page. The problem is that the resulting URL I see in my browser is: http://localhost:63163/#/AdminUtils/WebForm1.aspx[^] Notice that there is a # (hash) symbol in the URL. The problem I'm having is that I have a 3rd party Grid on that page which is not operating correctly. If I manually change the URL to remove the # symbol, then the grid works perfectly. Anybody know why this # symbol is showing up in my URL ? How can I get rid of it ? Thanks.
Ah ... the problem was being caused by jQuery Mobile. The solution was to make the link like this ... Notice the rel="external"
<a href="~/AdminUtils/WebForm1.aspx" rel="external" title="Form 1">Webform1 Here </a>
I found the answer here ... http://stackoverflow.com/questions/9737925/jquery-mobile-urls-add-tag-which-breaks-forms-in-internet-explorer[^]