14
Reply

How to Store Data into a table of SQL in MVC without model

Mark Tabor

Mark Tabor

Dec 18 2016 5:32 AM
437
How can i store data from a form created in mvc razor view without a model class and entity framework , I have wrote a simple method but as in razor view i have 
@Html.TextBox("txtPrice", null, new { @class = "form-control valid", @data_val = "true", @data_val_required = "Property Price is required" })
 
 
How to get this textbox value in my c# code either i have to use Query String or what else is the technique i am good with web forms and i web forms we have runat="Server" attribute to access the text box but in razor i do not know how to achieve this.

Answers (14)