Using A Javascript Variable Within Razor
I am aware that Razor is server side and Javascript client side. I am trying to workaround this. Here's what I wanted: RAZOR: if (count > 0) { t.Add().Text('Yeah')
Solution 1:
Simply No , The reason is same server-side language run first, than after browser run client side languages, So you can use server side variables values in client side language, you can generate client side code from server side but this all will not work in vice-versa,
The option you have for your problem is only Ajax request
Post a Comment for "Using A Javascript Variable Within Razor"