I am using Telerik HTML5 charts. Basically i have flat tables in the database and frankly displaying the x/y axis from the columns i select. Initially i had done everything without a WHERE clause whereby i will simply get the data between specified dates. Though until i developed them, i just had a simple select statement.
Im using the
Currently I have this.
So this simply calls the sp and returns the column values. Though i need to pass parameters into this sp. it can be done from the code behind (which i am assuming that it must be from there) or from the aspx page. I dont mind.
Thanks.
UPDATE:
I think im close but still in need of help. I have added the parameters within the
In the code behind im then doing
protected void dsDtnTimMedByMon_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
System.Data.Common.DbCommand command = e.Command;
command.Parameters["@fromDate"].Value = _startDate;
command.Parameters["@toDate"].Value = _endDate;
}
OR
ds1.SelectParameters.Add("fromDate", System.Data.DbType.Guid, _startDate.ToShortDateString());
But unfortunately, when debugging, as soon as the Selecting event ends, it just stops the execution and fails showing this error on the browser:
Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminatedAny help please?


Iftikar HussainRank #423 · 5.9K reputationPosted Aug 26, 2013, 2:17 AM EDT
Please refer the below link and try to incorporate the same thing in your code
http://msdn.microsoft.com/en-us/library/z72eefad(v=vs.100).aspx
Regards,
Iftikar
Kyle Bartolo8 reputationPosted Aug 26, 2013, 4:47 AM EDT
In code behind in the OnSelecting event:
e.Command.Parameters["@DATE_FROM"].Value = _startDate;
e.Command.Parameters["@DATE_TO"].Value = _endDate;
In a nut shell, make sure the Direction is 'Input' and that you place the '@' in c# code whilst you dont do so in the aspx Parameter Name.
hope this will help
Kyle Bartolo8 reputationPosted Aug 26, 2013, 4:48 AM EDT