datetime on querystring

M

mcnews

where am i f'ing up?

sending page:

<input id='DownLoadReportButton' runat='server' type='button'
value='Download Report'

onclick='window.open("AssetPurchaseSummaryReport_Download.aspx?
BeginDate=" + document.getElementById("beginDateTextBox") +
"&EndDate=" + document.getElementById("endDateTextBox"));' />


receiving page:


<SelectParameters>
<asp:querystringparameter Name="BeginDate"
Type="DateTime" querystringfield="BeginDate" />
<asp:querystringparameter Name="EndDate"
Type="DateTime" querystringfield="EndDate" />
</SelectParameters>

thanks much,
mike
 
A

Andrew Morton

Did you look in the rendered HTML?

Probably you need something along the lines of

document.getElementById('<%= beginDateTextBox.ClientId %>')

(I thought it was normal to use double-quotes for HTML attributes and single
quotes in JavaScript. Except with jquery.)

HTH,

Andrew
 
M

mcnews

this works:

onclick='window.open("WebForm1.aspx?BeginDate=" +
document.getElementById("beginDateTextBox").value + " &EndDate=" +
document.getElementById("endDateTextBox").value);'
 

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

Top