Default value in textbox EditItemTemplate

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#
 
J

James

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.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top