Forum Moderators: open

Message Too Old, No Replies

Input vs. <asp:textbox>

what is and why is the difference?

         

txbakers

7:24 pm on Jun 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm following the tutorial and have noticed that sometimes we use the <asp:textbox> control and sometimes we use the traditional <input type="text"> control. Both include the runat=server.

When I try to interchange them, I get compile errors

Is there a reason to use one or the other? I didn't see the documentation on that little point.

txbakers

8:32 pm on Jun 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And another question: why can I not use the onChange event of an <asp:dropdownlist> or even a <select> ?

andrey_sea

9:00 pm on Jun 4, 2002 (gmt 0)

10+ Year Member



You probably cannot use onChange event in the server based control because onChange fires on the client side...

You can use it if you set the server control to respond to onChange type events, not just to click-submit type events..

On the dropdown list you can use a server based onChange equivalent: onSelectedIndexChanged="" and you need the autoPostBack to be set to True..

textBox control is an equivalent of input control, except it has more functionality in IE. In Visual Studio textBox has a lot of properties which input control does not.