Control state is lost at render time ASP.Net 1.1

A

alsu50

Hi All,

Here is my problem:

I created a class that inherints from
System.Web.UI.WebControls.WebControl.
I have a dataset "DS" as a global variable for this class.
I have a method, say, GetData() that is referenced from the actual aspx
page (code-behind) and it goes down to the database and fills the "DS".
After this call, I have data and tables in DS, everything is ok.

Then, when the Render method is called, DS is empty. There are no
tables. All the data is gone. Why does it do that and how can I fix
this?

I use ASP.Net 1.1

Thank you.
 
A

alsu50

Got it figured out. I had to declare the control as "protected" on the
calling page.
 

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

Top