Bharath Peggem

Bharath Peggem

  • NA
  • 696
  • 9.9k

Url problem with Jquery in mvc4

Oct 20 2015 2:35 AM
Hi ,
 
 Am working MVC4 with Jquery, I have problem with URL redirect to Controller. 
 
when am Publish and Deploye the application to IIS Server in that time rise the Problem.
 
My problem Is.
 
 When i click the a href link button it is redirect to controller. 
 
<a her="#"  id='linkbuttonId ' ></a>
 
Ex: in View page am getting partialview like
  
  $('#linkbuttonId' ).click(function(){
              $.get('/Home/Index', function(data){
                      //---my code 
               });
     });
 
 In IIS server Vartual Directiory folder name TestApp  when iam public the application hosted in iis server and run the application.
 
i click the a herf link button it is not redirect to Controller.
 
when am change the url link in Jquery  like
     
   $.get('/TestApp/Home/Index'),function(data){});
 
Its working Perfectly and redirect to controller and getting the partialview...
 
how can i solve the problem. 
 
Can you please give me a perfect Deployement and how to publish the MVC 4 application in iis server 
 
 
Thanks,
Bharath Peggem 
 
 
   

Answers (2)