How to put value in asp.net textbox from javascript?

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default How to put value in asp.net textbox from javascript?

    Hi,

    I don't know a lot about javascript - and i'm stuck on a certain problem. I
    need to put a value in an <asp:textbox> control from a javascript.
    The textbox is called "txtThumb" - and the name stays the same once rendered
    to html.
    I've tried txtthumb.text & txtthumb.value, but both do nothing.

    I'm sure it must be quite simple :/
    ---
    Tim De Vogel
    S-Data NV

    Eph0nk Guest

  2. Similar Questions and Discussions

    1. Client-Side Validation of asp:TextBox with Javascript
      Hi - I'm trying to do client-side validation of the text in a Asp.Net textbox control using javascript. My page has the following: <form...
    2. Referencing a TextBox control in Javascript from DataList ItemTemplate
      I have a calendar control which pops up as a new window when i click on my textbox. The calendar control returns a Javascript function whereby...
    3. DatGrid TemplateColumn TextBox JavaScript ClientSide Validation?
      Hi, I am using 2 TemplateColumn TextBoxs in my Grid. On the Submit button click event I want to do the validation on the client side. In the...
    4. Accessing Textbox inside a Template column using javascript
      Hi, I am having a datagrid with a template column. Inside the template column I have a textbox and an image button. On click of the image button, I...
    5. VERY STRANGE BUG? Adding a textbox control causes other textbox control to fail???
      I've had this happen a few times too. I'm still not positive of what exactly causes it but all that's happening is the control that no longer...
  3. #2

    Default Re: How to put value in asp.net textbox from javascript?

    javascript be case sensitive, but you probably know that :-)

    formname.TetBox ID.value = any value

    "Rohit" <sahnirohit@hotmail.com> wrote in message
    news:ephkhSAXDHA.2360@TK2MSFTNGP12.phx.gbl...
    > Hi,
    > You can either do it using
    > formname.TetBox ID.Value = any value
    > OR
    > document.getElementById(TextBox ID).value = any value
    >
    > regards,
    > Rohit,
    >
    >

    Jason Guest

  4. #3

    Default Re: How to put value in asp.net textbox from javascript?

    Yeah, i knew that.
    Thanks for the help..Works perfectly.

    --
    ---
    Tim De Vogel
    S-Data NV

    "Jason" <c_bananas@mighty.co.za> schreef in bericht
    news:uHoNBfAXDHA.1280@tk2msftngp13.phx.gbl...
    > javascript be case sensitive, but you probably know that :-)
    >
    > formname.TetBox ID.value = any value
    >
    > "Rohit" <sahnirohit@hotmail.com> wrote in message
    > news:ephkhSAXDHA.2360@TK2MSFTNGP12.phx.gbl...
    > > Hi,
    > > You can either do it using
    > > formname.TetBox ID.Value = any value
    > > OR
    > > document.getElementById(TextBox ID).value = any value
    > >
    > > regards,
    > > Rohit,
    > >
    > >
    >
    >
    Eph0nk Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139