I want to know is it possible to find out the value of html.textbox inside a view. if i have @Html.TextBox("textdata") can I read data from that textbox like in my paragraph
my value is: **
So i need this becouse i want that user write a number inside a textbox which i will take as an param to my function like: @Html.ActionLink("click me", "actionname", "controller", new { param = textbox value}, "")
You need to use javascript for this. Instead of using an action link a better way to achieve this would be to use a form:
This way the value entered by the user in the textbox will be automatically sent to the server when he submits the form.
If you still want to do this using javascript (not recommended) here's how you could proceed with jQuery. Subscribe for the click event of the link and fetch the value from the text field and append it to the url: