Hi,
how to pass Javascript value to controler in mvc archicture?
I am pass value in this types
location.href = "Home/Delete/" + idval;
In my Controler i get the value of "idval" ..........
any query regarding my question please revert me...
Thanks,
Jitenra Patel
Loading
Amit ChoudharyPosted Mar 4, 2010, 8:52 AM
below is a samjple of using javascript value to code behind or server side:
Code Behind:
But you should pay attention on the order of setting the variable to Hidden control in JavaScript and retrieving the value of Hidden control in aspx page. In the same event handle, it needs execute the Client first. For example, OnClientClick="abc()" will be executed before onclick="Button1_Click". Otherwise, you will get the empty.
Hope you get some idea from Here.Please mark as answer if it helps you.