if you are using webcontrols and button class or any thing like imagebutton
etc you should use
attributes collection and add custom values to it
in this case you want to add a clientside onclick attribute so you do
something like this
btnTest.Attributes.Add("onclick", "window.open('test.aspx?mydate" +
datetime.now + "')");
something as simple as that will add a client side attribute the the
webcontrol and will have the desired effect.
--
Regards,
Hermit Dave
(
http://hdave.blogspot.com)
"John Cosmas" <va*****@msn.com> wrote in message
news:#a**************@tk2msftngp13.phx.gbl...
In the old form of ASP when code was executed all on one single page, I
was able to set a value into a variable and use it all over the page like
this -
<% pvntDate = Date() %>
<input type="button" ID="btnTest" onclick="window.open('test.asp?mydate=<%
= pvntDate %>')">
I would like to reproduce this from the server side in the new .NET
implementation so I could pass the date value into the client side of the
page as it appear in the example above. Please help...
TIA
John