Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7825147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:50:53+00:00 2026-06-02T08:50:53+00:00

Anyone else having trouble with MVC3, JQuery 1.7.1 and JQuery Mobile 1.1.0? Whenever I

  • 0

Anyone else having trouble with MVC3, JQuery 1.7.1 and JQuery Mobile 1.1.0? Whenever I submit a standard MVC form my URL goes from:

localhost/site/controller/action

To

localhost/site/controller/action#/controller/action

I’m in the middle of simplifying an existing site that is quite messy so am working through controller by controller cleaning up and removing jquery form handling where it isn’t required and just using Razor. I wondered if something in my project was conflicting but i’ve managed to replicate it from a new project:

Open VS2010, New Empty MVC3 Project – i.e. everything not mentioned below is the default MVC project

Add TestController:

using System.Web.Mvc;
using MvcApplication1.Models;

namespace MvcApplication1.Controllers
{
    public class TestController : Controller
     {
        public ActionResult Testing()
        {
            return View(new TestModel());
        }

        [HttpPost]
        public ActionResult Testing(TestModel testModel)
        {
            if (ModelState.IsValid)
            {
                //Temp for examples sake
                ModelState.AddModelError("EmailAddress", "Account not found.");
            }

            return View();
        } 
    }
}

Add TestModel:

using System.ComponentModel.DataAnnotations;

namespace MvcApplication1.Models
{
    public class TestModel
    {
        [Required(ErrorMessage = "Email is required.")]
        [DataType(DataType.EmailAddress)]
        [StringLength(50, ErrorMessage = "Email too long.")]
        public string EmailAddress { get; set; }
    }
}

Add view Folder Test with view Testing:

@model MvcApplication1.Models.TestModel

@using (Html.BeginForm("Testing", "Test", FormMethod.Post))
{ 
    <div id="divForgotPassword">
        <fieldset data-role="fieldcontain">
            <legend>Forgot Password</legend>
            <div id="editor-label">
                <label for="txtLogonID">
                    Email Address:</label></div>
            <div id="editor-field">
                @Html.TextBoxFor(m => m.EmailAddress, new { type = "email" })
                <br />
                @Html.ValidationMessageFor(m => m.EmailAddress)</div>
            <input type="submit" value="Reset Password" data-role="button" data-inline="true" />
        </fieldset>
    </div>
}

Run and visit http://localhost:65298/Test/Testing
Hit Reset Password, validator works, URL doesn’t change

Add jquery.mobile-1.1.0.js and jquery-1.7.1.min.js to scripts folder

To _Layout.cshtml add:
And Change jquery 1.5.1 to 1.7.1

Run and visit our page again
Hit Reset Password, validator works but now you have:
http://localhost:65298/Test/Testing#/Test/Testing

I must be doing something wrong?? The main problem with this is that with that URL other javascript I have doesn’t like to run. I also worry it will interefere with something else, plus it looks ugly and has to be wrong…

Many Thanks In Advance!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:50:54+00:00Added an answer on June 2, 2026 at 8:50 am

    That is the default behaviour of jQuery mobile. For all links, instead of loading a page in normal way, It sends an ajax request and load the page and then update(just append) the url.

    If you want to disable this behaviour, you can put rel=external in the link and the link
    will load without ajax and your url will then be usual.

    <a href="User/somepage" rel="external" />I wont be using ajax for navigation</a>
    

    http://jquerymobile.com/demos/1.0a4.1/#docs/pages/docs-navmodel.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is anyone else having trouble running Swing applications from IntelliJ IDEA 8 Milestone 1?
Is anyone else having trouble getting with their mysql server not starting with lion.
Is anyone else having problems with InfoBox ? Is there a better way to
So I searched and couldn't find anyone else having this problem: When I try
I've been having trouble querying a web server for information from my Windows Phone
I'm having trouble getting jquery.validation.js to validate a select box. It is working on
I'm having some trouble with detecting a jQuery ajax request with PHP on a
I'm using jQuery 1.3.2. I'm having trouble getting a correct height in Internet Explorer
I'm having some trouble using the connection manager from a script task in SSIS.
I am having trouble reading data from a file into a list in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.