Default Date in Bound TextBox

J

j.t.w

Hi,

I'm trying to set a default date (today's date) to a bound textbox in
an InsertItemTemplate of a FormView control.

Currently, the RegDateTextBox value does get inserted when I insert the
record.

Instead of making the user type in the date (most of the time it will
be the current date), I would like to make it easier on the user and
have the date already in the textbox.

This is what I have...

<asp:TextBox ID="RegDateTextBox" runat="server" Width="100px" Text='<%#
Bind("RegDate") %>'></asp:TextBox>

<%= DateTime.Today.ToString("d")%>

Please let me know if you need any more information.

TIA,
j.t.w
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top