Hello everyone, I know getting the text from asp.net textbox control is very easy. But how can I get the text from html element? I need to insert the text to the database. The reason I don't use asp.net textbox control because I have to dynamically create
the textboxes on client side.
Thank you ignatandre for the link. Will have to look into more details how to use the .dll file. In the meantime, anything you could share on how to get the value from the html input elements?
have you tried by iterating Request.Form Collection and trying to get these values....make sure you create these controls inside form tag with runat attribute,...
Hello Ramiramilu, anything example on how to do this please? For example, I have an html input element type="text". I input the value of "Test1" into the textbox, how can I get the value from the textbox into my database? Javascript?
I am trying to do this on client side because it is faster and I have seen some sites have already done that.
The solution suggested by ignatandre is just too advanced for me.
I appreciate your and ignatandre's help very much.
asplearning
Participant
909 Points
952 Posts
How to get input type="text" value into the database?
Nov 06, 2012 09:35 PM|LINK
Hello everyone, I know getting the text from asp.net textbox control is very easy. But how can I get the text from html element? I need to insert the text to the database. The reason I don't use asp.net textbox control because I have to dynamically create the textboxes on client side.
Thanks for your help.
ignatandrei
All-Star
134832 Points
21599 Posts
Moderator
MVP
Re: How to get input type="text" value into the database?
Nov 06, 2012 09:36 PM|LINK
http://www.denisbauer.com/ASPNETControls/DynamicControlsPlaceholder.aspx
asplearning
Participant
909 Points
952 Posts
Re: How to get input type="text" value into the database?
Nov 06, 2012 09:49 PM|LINK
Thank you ignatandre for the link. Will have to look into more details how to use the .dll file. In the meantime, anything you could share on how to get the value from the html input elements?
Regards;
asplearning
Participant
909 Points
952 Posts
Re: How to get input type="text" value into the database?
Nov 06, 2012 09:51 PM|LINK
I tried to understand how this was done so I downloaded the source code and open it in visual studio 2010. And for some reasons, it gave errors.
ramiramilu
All-Star
95363 Points
14096 Posts
Re: How to get input type="text" value into the database?
Nov 07, 2012 06:27 AM|LINK
have you tried by iterating Request.Form Collection and trying to get these values....make sure you create these controls inside form tag with runat attribute,...
Thanks,
JumpStart
ignatandrei
All-Star
134832 Points
21599 Posts
Moderator
MVP
Re: How to get input type="text" value into the database?
Nov 07, 2012 07:54 AM|LINK
What errors? And did you have downloaded the demo?
asplearning
Participant
909 Points
952 Posts
Re: How to get input type="text" value into the database?
Nov 07, 2012 07:33 PM|LINK
Hello ignatandrei. I use VS 2010 and it tried to convert the project and the message said:
"Source control - unable to access the database. The associated source plug-in is not installed or could not be intinialized....."
Thanks for your patience.
Regards
asplearning
Participant
909 Points
952 Posts
Re: How to get input type="text" value into the database?
Nov 07, 2012 07:34 PM|LINK
Hello ramiramilu, any example or link I can refer to? Sorry I am still learning this.
Thanks.
ignatandrei
All-Star
134832 Points
21599 Posts
Moderator
MVP
Re: How to get input type="text" value into the database?
Nov 07, 2012 08:57 PM|LINK
This is VS error, not project error. Compile the project
asplearning
Participant
909 Points
952 Posts
Re: How to get input type="text" value into the database?
Nov 13, 2012 12:38 AM|LINK
Hello Ramiramilu, anything example on how to do this please? For example, I have an html input element type="text". I input the value of "Test1" into the textbox, how can I get the value from the textbox into my database? Javascript?
I am trying to do this on client side because it is faster and I have seen some sites have already done that.
The solution suggested by ignatandre is just too advanced for me.
I appreciate your and ignatandre's help very much.
Regards;