I want to know about html control that use in Asp.net page.
1-I have signup html Template, I was put that html signup template form in aspx paget(asp.net page) . So I m not use Asp.net controls like Text box and Button and I want to use html control I was access Text field but how I submit that data on button mean
how I call them or use the html button in aspx page to submit our data.
. So I m not use Asp.net controls like Text box and Button and I want to use html control I was access Text field but how I submit that data on button mean how I call them or use the html button in aspx page to submit our data.
Hello,
For a general Button of Html codes in a page, you can do what the 2nd and 3rd men said.
For a general TextBox, you can add "id" and "runat=server" to make it acceptable by Server-side through GenericHtmlControl or something related to the class.
I was used it and i take data from text filed. My question is that data coming from textfield and that data sumbit or show on other page by click button. i was used asp.net button that work fine but when i used html button how im fire html button to submit
data. because html have no C# code. so little bit confuse on it.
soomrosami
0 Points
9 Posts
Submit form using Html Controls in asp.net page
Nov 25, 2012 04:26 PM|LINK
Hi:
I want to know about html control that use in Asp.net page.
1-I have signup html Template, I was put that html signup template form in aspx paget(asp.net page) . So I m not use Asp.net controls like Text box and Button and I want to use html control I was access Text field but how I submit that data on button mean how I call them or use the html button in aspx page to submit our data.
so please guide me
Thanks
Samiullah
niksv
Contributor
5925 Points
1115 Posts
Re: Submit form using Html Controls in asp.net page
Nov 25, 2012 05:39 PM|LINK
I'm sorry but I didn't quite understand your language. I guess this is what you need:
///ASPX <form id="form1" runat="server"> <div> <input type="text" id="txtUsername" name="username" /> <input type="button" value="Submit" onclick="document.forms[0].submit();" /> </div> </form> ///Code behind var username = Request.Form.Get("username");aarsh
Participant
1543 Points
428 Posts
Re: Submit form using Html Controls in asp.net page
Nov 25, 2012 10:49 PM|LINK
Try to use something similar in the body/form tags & for some form you have as below:
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Submit form using Html Controls in asp.net page
Nov 26, 2012 06:37 AM|LINK
Hello,
For a general Button of Html codes in a page, you can do what the 2nd and 3rd men said.
For a general TextBox, you can add "id" and "runat=server" to make it acceptable by Server-side through GenericHtmlControl or something related to the class.
soomrosami
0 Points
9 Posts
Re: Submit form using Html Controls in asp.net page
Nov 27, 2012 04:33 PM|LINK
Hi Im Samisoomro:
Thank you sir for you reply
<form id="form1" runat="server"> <div> <input type="text" id="txtUsername" name="username" /> <input type="button" value="Submit" onclick="document.forms[0].submit();" /> </div> </form> ///Code behind var username = Request.Form.Get("username");
I was used it and i take data from text filed. My question is that data coming from textfield and that data sumbit or show on other page by click button. i was used asp.net button that work fine but when i used html button how im fire html button to submit data. because html have no C# code. so little bit confuse on it.
thanks
niksv
Contributor
5925 Points
1115 Posts
Re: Submit form using Html Controls in asp.net page
Nov 30, 2012 02:21 PM|LINK
Which solution helped you!