N
niki
Hello.
I have a postback problem with viewstate.
I've searched the group and found many threads about this, but I still
can't understand...
I have this code:
DataSet ds = null;
if(! this.IsPostBack){
....
} else{
StringReader sr = new StringReader((String)(ViewState["ds"]));
ds.ReadXml(sr);
}
and I get an InvalidCastException.
BTW, I've chosen the name "ds" for the ViewState; I can't see on the
plain-vanilla microsoft documentation what is supposed to be that very
string value; I assume it can be any string (always the same, of
course). Am I right?
Could you please tell me what's wrong?
Thanks
I have a postback problem with viewstate.
I've searched the group and found many threads about this, but I still
can't understand...
I have this code:
DataSet ds = null;
if(! this.IsPostBack){
....
} else{
StringReader sr = new StringReader((String)(ViewState["ds"]));
ds.ReadXml(sr);
}
and I get an InvalidCastException.
BTW, I've chosen the name "ds" for the ViewState; I can't see on the
plain-vanilla microsoft documentation what is supposed to be that very
string value; I assume it can be any string (always the same, of
course). Am I right?
Could you please tell me what's wrong?
Thanks