Check presence of Session State

G

Guest

I would like to check whether the session object contains dataset before
retrieving from the data source.

If NOT CType( Session("ds"), Dataset) = "" Then
dg.DataSource= ds.Tables("dt")
dg.DataBind( )
Else
...retrieve from datasource
End if


The code above throws back error as dataset is not of String type. I've
tried other ways of checking this such as replacing the double quote "" with
"System.Data.Dataset" or "System. Object", etc but all to no avail.

Anyone can help ?
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top