Here is my scenario
@Html.Textbox("value")
how to pass above text box value to below action link
@Html.ActionLink("Search","Search",new {firstname=value)
Here is my scenario
@Html.Textbox("value")
how to pass above text box value to below action link
@Html.ActionLink("Search","Search",new {firstname=value)
You need to use a form
You can do it using javascript. First generate the anchor tag with a href having a faked value of firstname:
Also, generate the with an ID (i.e. txtSearch).
Then, using javascript you can attach the click event of this . Using jQuery code will be something like:
Greetings!