datetime on querystring

  • Thread starter Thread starter mcnews
  • Start date Start date
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
 
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
 
this works:

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