I have text box input and some radio buttons. For example, my text input input looks like this:
<input type="text" name="IP" id="IP" />
As soon as the user clicks a button on the web page, I want to transfer data to my controller:
<input type="button" name="Add" value="@Resource.ButtonTitleAdd" onclick="location.href='@Url.Action("Add", "Configure", new { ipValue =@[ValueOfTextBox], TypeId = 1 })'"/>
This may be trivial, but my problem is that I donโt know how to get the value of the text field and pass it to the controller. How can I read the value of a text field and pass it to the controller via ipValue=@[ValueOfTextBox] ?
html c # asp.net-mvc razor asp.net-mvc-4
user1624552 Sep 18 '13 at 13:06 on 2013-09-18 13:06
source share