Tagged Questions

2
votes
4answers
620 views

Handling ASP.NET MVC Routing in External JavaScript

What's the best way to avoid hardcoding URL's in JavaScript (primarily used when making AJAX calls)? In the past: Render JavaScript variable with result of @Url.Action or @Url.RouteUrl Pass result ...
2
votes
1answer
185 views

ASP.NET MVC Routes - domain.com/Events#!/12 to domain.com/Events/12

I'm updating a few sections in a website with Ajax, but now i'm trying to do something similar to what facebook does. When i update the content of a section, the problem is that my url remains the ...
1
vote
1answer
120 views

conditional change of script tag based on url routing mvc 3

I am using requireJS for my hybrid app . Now I need to change the script tag located into my layout page with conditions on url . The script tag looks something like this <script ...
1
vote
1answer
95 views

Parameter to a URL preventing javascript from working properly?

First of all, my whole web site works fine. All the pages, up to now, have no URL parameter. Now the problem begins. I have a flash banner that has to be a PNG static image on Apple mobile devices. It ...
1
vote
2answers
1k views

MVC3 Custom Route has issues with Virtual Directory

I have this in my global //custom route routes.MapRoute( "DownloadInstall", // Route name "{controller}/{action}/{id}/{logonserver}", // URL with parameters new { controller = ...
0
votes
4answers
81 views

return another MVC3 view of the same controller after ajax is used

How to return another view of the same controller? I made some debugging for the application: the ajax method calls the controller action, pass the parameter, executes the instructions. At the ...
0
votes
7answers
139 views

Why isn't jQuery working on published site?

I'm using asp.net mvc2. I have created a project with good slideshows and menu. It works fine on local machine, but when I publish and view through the server, jQuery is not working. Here is how ...
0
votes
1answer
105 views

Setting up a common route for javascript calls in ASP.NET MVC project

I have a bizarre routing issue with my ASP.NET MVC project that I hope you guys can help me with. Overall everything works fine when I run the project off my localhost or run it on the server while ...
0
votes
1answer
302 views

return PartialView to a popup windows at another view

I have an Index.aspx with a button inside which that button will call a controller, doing some logic and returning to a PartialView control - let's named it PopUpPartialView.ascx (as a popup). So to ...
0
votes
0answers
94 views

MVC 4 : Javascript and CSS disabled on RedirectToAction

I have a login page that will redirect to home page when logged in successful. However, when logged in successfully the javascript and css of the home page are disabled or is not applied to the page. ...
0
votes
1answer
91 views

Deploying MVC 3 application to URL Folder has corrupted javascript and content path

I have created a mvc3 application which work fine locally. I work for a department where all websites sits under single url. when i deployed my website to test environment than page are coming up but ...
0
votes
2answers
195 views

assigning path in Inline javascript in asp.net mvc

I am using MVC 2 architecture. I have a Javacript file (x.js)...which has the declaration for object hs (i.e, var hs). In my aspx file I am calling (x.js) file using <script> tag and it's ...