Click here to Skip to main content
15,925,528 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionI am getting the Pin
indian14328-Jan-16 21:45
indian14328-Jan-16 21:45 
AnswerRe: I am getting the Pin
F-ES Sitecore28-Jan-16 21:59
professionalF-ES Sitecore28-Jan-16 21:59 
SuggestionRe: I am getting the Pin
Richard Deeming29-Jan-16 5:07
mveRichard Deeming29-Jan-16 5:07 
GeneralRe: I am getting the Pin
indian14329-Jan-16 6:47
indian14329-Jan-16 6:47 
GeneralRe: I am getting the Pin
Richard Deeming29-Jan-16 6:56
mveRichard Deeming29-Jan-16 6:56 
GeneralRe: I am getting the Pin
indian14329-Jan-16 8:17
indian14329-Jan-16 8:17 
GeneralRe: I am getting the Pin
F-ES Sitecore31-Jan-16 22:13
professionalF-ES Sitecore31-Jan-16 22:13 
GeneralRe: I am getting the Pin
indian1431-Feb-16 8:02
indian1431-Feb-16 8:02 
AnswerRe: I am getting the Pin
Nathan Minier29-Jan-16 2:12
professionalNathan Minier29-Jan-16 2:12 
GeneralRe: I am getting the Pin
indian14329-Jan-16 6:49
indian14329-Jan-16 6:49 
AnswerRe: I am getting the Pin
ZurdoDev2-Feb-16 8:43
professionalZurdoDev2-Feb-16 8:43 
QuestionNumber Format Pin
Imran Developer28-Jan-16 17:00
Imran Developer28-Jan-16 17:00 
AnswerRe: Number Format Pin
JHizzle29-Jan-16 0:51
JHizzle29-Jan-16 0:51 
AnswerRe: Number Format Pin
ZurdoDev29-Jan-16 2:32
professionalZurdoDev29-Jan-16 2:32 
QuestionVisual Studio 2015 web service : change port Pin
Pierrick Orban28-Jan-16 12:41
Pierrick Orban28-Jan-16 12:41 
AnswerRe: Visual Studio 2015 web service : change port Pin
Nathan Minier29-Jan-16 2:16
professionalNathan Minier29-Jan-16 2:16 
GeneralRe: Visual Studio 2015 web service : change port Pin
Pierrick Orban31-Jan-16 23:00
Pierrick Orban31-Jan-16 23:00 
GeneralRe: Visual Studio 2015 web service : change port Pin
Nathan Minier1-Feb-16 1:29
professionalNathan Minier1-Feb-16 1:29 
GeneralRe: Visual Studio 2015 web service : change port Pin
Pierrick Orban1-Feb-16 3:01
Pierrick Orban1-Feb-16 3:01 
GeneralRe: Visual Studio 2015 web service : change port Pin
Nathan Minier1-Feb-16 3:06
professionalNathan Minier1-Feb-16 3:06 
GeneralRe: Visual Studio 2015 web service : change port Pin
Pierrick Orban1-Feb-16 3:38
Pierrick Orban1-Feb-16 3:38 
QuestionMVC Razor View and JQuery, how to use @Url.Action Pin
jkirkerx28-Jan-16 10:13
professionaljkirkerx28-Jan-16 10:13 
AnswerRe: MVC Razor View and JQuery, how to use @Url.Action Pin
F-ES Sitecore28-Jan-16 21:55
professionalF-ES Sitecore28-Jan-16 21:55 
GeneralRe: MVC Razor View and JQuery, how to use @Url.Action Pin
jkirkerx29-Jan-16 3:42
professionaljkirkerx29-Jan-16 3:42 
GeneralRe: MVC Razor View and JQuery, how to use @Url.Action Pin
F-ES Sitecore29-Jan-16 3:57
professionalF-ES Sitecore29-Jan-16 3:57 
jkirkerx wrote:
Yes it is

And you didn't think that was worth mentioning? Smile | :)

js files are flat text files that are served straight up to the browser, no different from jpg or gif files, they are not "processed" by .net so you can't use razor markup in them or server-side processing. What you'll need to do is define a variable in your razor view like

<script>
var action = '@Url.Action("Action", "Controller")';
</script>


Then in your js file just us the "action" variable;

url: action,

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.