PC Review


Reply
Thread Tools Rate Thread

datetime on querystring

 
 
mcnews
Guest
Posts: n/a
 
      8th Jun 2011
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
 
Reply With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      8th Jun 2011
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


 
Reply With Quote
 
mcnews
Guest
Posts: n/a
 
      8th Jun 2011
this works:

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

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Millisecond values missing when inserting datetime into datetime column of sql Server Manikandan Microsoft C# .NET 4 18th Jul 2007 08:59 PM
How can I save a DateTime from my C# program into a SQL Server (datetime) database column. Steve Kershaw Microsoft ASP .NET 5 29th Aug 2006 03:10 AM
DateTime conversion to its sqlServer datetime float representation. A.Neves Microsoft C# .NET 1 20th Apr 2006 01:01 PM
How to get value of QueryString inside QueryString Mehdi Microsoft ASP .NET 6 6th Apr 2006 04:41 PM
System.DateTime doesn't convert to SqlDbType.DateTime Narshe Microsoft C# .NET 3 2nd Nov 2005 05:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:57 AM.