How to set initial value in TextBox

DaveG

New Member
How do you set the inistial value in a server side TextBox?<BR><BR>When someone pulls up my form, I want it to have the Time populated automatically.<BR><BR>I tried the following and id did not work:<BR><asp:TextBox ID="strTime" Width="200" Runat="server"><%Response.Write(Now())%></asp:TextBox>do it programitacally...<BR><BR><BR>protected TextBox as strTime<BR>sub page_load(o as object, e as EventArgs)<BR> strTime.Text = DateTime.Now()<BR>end sub<BR><BR>or something similar
 
Back
Top