Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Databinding for a newbie

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
US
When switching from asp to aspx, is there a new technique for binding data to a textbox control, or do we continue to use code like:
Code:
<input name="txtZip" 
value='<%=oRS("zip")%>' >
I have gone through the videos that discuss the new data controls such as grid and formview but have seen nothing on using regular textboxs outside of the formview.

Thanks
 
You can do that, but you are best off assigning the text property of the text box in the code behind.
 
also, you are using the standard html textbox control, but you might want to consider using the asp server control, like so:

Code:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

one advantage being that you can easily manipulate it using the codebehind, and it shows up in your intellisense, which gives you the list of all the things you can do with it right at your fingerips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top