3
Answers

dot net 4.8 web form data input to server

I had several examples of dot net input form using input tags that start with <asp:.... or runat=server but don't seem to be getting it correct like before. Do you have an example of how it's done?

Answers (3)
3
Vishal Joshi

Vishal Joshi

247 7.8k 134.9k 1y

Hello Oliver.

For dot net 4.8 or MVC, you can use model-based form biding to connect with the server.

Check below sample code example:

@Html.EditorFor(model => model.PropertyName, new { htmlAttributes = new { @class = "form-control" } })

Thanks

Vishal Joshi

3
Rijwan Ansari

Rijwan Ansari

4 66.3k 3m 1y

Yes, if you are using web form and server control, then it is.

Example:

<asp:TextBoxID="Text_Box" runat="server" ></asp:TextBox>  
2
Jignesh Kumar

Jignesh Kumar

30 39.5k 2.9m 1y

Hello oliver duCille,

Please refer this one to create server control,

If you want to create

1. TextBox

<asp:textbox id="txtName" runat="server" > </asp:textbox>

2. Button

<asp:button id="btnSubmit" runat="server" > </asp:button>

3. Label

<asp:label id="lblMessage" runat="server" </asp:label>