Unable to Get t

J

John Walker

Hi,
On the postback I am trying to get data from a TextBox control in a
Datagrid. This works fine except when the textbox has been disabled using
JavaScript. Here's the code to reference the control and get the text:

Dim txt As TextBox = CType(dg.Items(iMisc).FindControl("txtCustomer"),
TextBox)
Dim sCustomer As String = txt.Text

txt.Text will be blank if the textbox was disabled. Here's the javascript:

dml[sPrevboxid].disabled=true;

Are we not allowed to use JavaScript to disable datagrid textbox controls if
we want to reference the text on a postback?

Thanks, John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top