troubleshooting Question

Using Session DateTime Variable as SqlDataSource Parameter

Avatar of Umut Şeker
Umut ŞekerFlag for Turkey asked on
.NET ProgrammingASP.NET
5 Comments2 Solutions1376 ViewsLast Modified:
I'm assigning DateTime data (for example: 01.01.2007 and 01.01.2009) to  session veriables like;
                Session.Add("FILTER_BEGINDATE", Convert.ToDateTime(txt_BeginDate.Text));
                Session.Add("FILTER_ENDDATE", Convert.ToDateTime(txt_EndDate.Text));

and using them as parameters to a SqlDataSource like;
WHERE  (MYDATE > @FILTER_BEGINDATE) AND (MYDATE < @FILTER_ENDDATE)

...@FILTER_BEGINDATE AND @FILTER_ENDDATE are DateTime parameters.

But I could get and data from the SqlDataSource. What could be the problem?
I'm using ASP.Net 2005 with C#
Thanks,
ASKER CERTIFIED SOLUTION
madhevan_pillai

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros