Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve textbox value from form submit

Status
Not open for further replies.

dzr

Programmer
Nov 20, 2001
109
US
My textbox (textarea) isn't inserting any values into the database.

the code below is what i'm using - it works for all the other fields:
string program_desc = (Request.Form["program_desc"]);

I did read somewhere that it's better to access the value with the .Text but that's giving me an error.

My silly observation:
in Micro. Visual Web Developer Express - under MISC ID -- the name of the field is not bold as it is with all the other fields...

I have searched much for each thing I post... there really seems to be almost too much info out there... none of it being that cohesive.

thanks!
 
yes.

the ID says the program_desc
but in the properties box - it has Name: textarea2

It doesn't seem to have all the asp:text blah-di-blah like the text inputs...


<textarea class="style3" cols="80" name="textarea2" rows="5" id="program_desc"></textarea>
 
you did an HTML control.. not an asp.net control
drag a textbox onto the form and change the mode to multiline
 
ah! that was an easy one.

thanks!
 
it's working but i'm still wondering...

is the:
string program_desc = (Request.Form["program_desc"]);

the best way to get at the data...?

it seems so tedious for a language that's all fancy like c#...

i saw some loops that kind of looked good but some were in VB and some just were crazy confusing...
 
That is classic asp programming. Use the .NET syntax:

string program_desc = program_desc.text;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top