|
mvc ActionLink return value from a textbox
Two ways you can do this.
1. Using Javascript : when the user edits the textbox you dynamically change the value of the anchor tag to include what they typed in. You can't use ASP.NET routing for this because that runs on the server and you need client side code.
2.form submit : this is used insted of a link. This is the recommended way in HTML. When the user is submitting data, it should be in a form. Wrap everything in a form tag and place the textbox and a button in there. Set the form's action to be the URL that you want it to post to.
|