Default value in textbox EditItemTemplate

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi all.

I'm struggling a bit with this so any help appreciated. (Framework 2.0,
VB.net )

I have a text box within an EditItemTemplate, the value of which is
bound to my GridView's datasource.

When there is no date value, I want to be able to supply the current
date as a default if the user opts to "Update" the row.


<EditItemTemplate>
<asp:TextBox ID="txtDate" runat="server" Text='<%# Bind("StartDate",
"{0:dd/MM/yyyy}") %>'> </asp:TextBox>
</EditItemTemplate>

I can't find an appropriate event to handle this.

Any hints available? VB.Net or C#
 
Slight amendment to the question :-)

I want the current date as a default to "appear" in the text box. Not
just record it via my update command.
 
Back
Top