button (show below). By including 'return false', you avoid the postback. For
variations on the formatting of the date, look here
Does this help?
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
("onclick", "var theDate=new Date();" & _
<form id="Form1" method="post" runat="server">
<asp:textbox id="txtDate" runat="server"></asp:textbox>
<asp:button id="Button1" runat="server" text="Default"></asp:button>
Microsoft MVPs have a question for *you*: Are you patched against the Worm?
"Jeff Cope" <com> wrote in message
I'd like to have a text box on my webform and a button beside that will set
the current date in the text box when the button is clicked. Is there a way
to do this without doing a postback?
Thanks for your help.