Unable to Get t

Discussion in 'ASP .Net Web Controls' started by John Walker, Oct 20, 2005.

  1. John Walker

    John Walker Guest

    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
     
    John Walker, Oct 20, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jasper
    Replies:
    0
    Views:
    414
    Jasper
    Jun 29, 2004
  2. Juan Dent
    Replies:
    1
    Views:
    2,299
    Cowboy \(Gregory A. Beamer\)
    Jul 14, 2003
  3. Pepito Grillo

    Unable to get the event

    Pepito Grillo, Jul 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    337
    Pepito Grillo
    Jul 18, 2003
  4. Al Cadalzo

    Unable to get next page in screen scrape

    Al Cadalzo, Nov 12, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    412
    Al Cadalzo
    Nov 13, 2003
  5. Jake Barnes
    Replies:
    6
    Views:
    398
    9.co.uk
    Feb 8, 2006
Loading...

Share This Page