Server Side controls in ASP.Net

  • Thread starter Thread starter Kerri
  • Start date Start date
K

Kerri

Hi,

I have an aspx page with some server side textboxes.

I have a button onmy page which allows users to add data
to a database.

In my onclick event for my button when I try and get teh
value from the textbox using..

Dim myString as String = textbox1.text

...it is blank.

When I do a..

Dim myString = Request.Form("textbox1")

...I get the value the user enetered.

I have declared my textbox as a control in my codebehind.

And it is an asp.net textbox.

Any ideas why this is?

This is baffling me.

Kerri.
 
Sounds like your onclick event is not registered with the
page. Click on the button and look at the properties
window to the right. You should see a yellow lightening.
Click on the lightening and make sure that the onclick
event is registered, if not, double click the button and
go to town!

- Rob
 
Back
Top