1 year ago
#344571
Prince Onukwili
Using HTML buttons and textbox in asp.net website
I got an offer to create a website and I want to use c# to do that, which means I must use asp.net framework right? I want to use my HTML textboxes and buttons to insert into my datebase instead of asp.net button and text boxes, I created two text boxes using HTML form and input tag, gave them a name and ID each, set runat attribute to server, then I tried to access my HTML text boxes in the button onclick method, but I can't even see the names of the textboxes in the list of objects in my C# code. So I can't make reference to them, to perform any codes using them.
I've tried:
<form>
<input name="username" id="username" type="text" runat="server" />
<input name="pword" id="pword" type="password" runat="server" />
<asp:button Name="login" Text="Login" runat="server" />
<form/>
When I tried accessing it in the .cs page I couldn't see username and pword.
html
asp.net
html-input
0 Answers
Your Answer