I want to pass an input control value (say textbox1.value or a javascript variable) to a controller action method (as a parameter) without a form post (using Ajax.ActionLink). please see the code below
is it possible to assign like new {name = textbox1.value} in Ajax.ActionLink.
View
<input type="text" id="textbox1" />
<% =Ajax.ActionLink("mylink", "linkfunction", new {name = textbox1.value}, new AjaxOptions { UpdateTargetId = "result"})%>
<span id="result"></span>
and controler action is ..
public string linkfunction(string name)
{
return DateTime.Now.ToString();
}