Ask a Question related to ASP.NET General, Design and Development.
-
Matt C. #1
Newbie question: session state:
I am fairly new to ASP.NET so please forgive errors in terminology.
I am using the CrystalReportsViewer control to display report data over the
web. Data is posted to the .aspx page from a different form on a standard
..html page. (I know ASP.NET likes to use postback to get form data, but I
decided not to do that here.)
The first page of the report loads fine, looks pretty, we're very happy, but
when I try to browse to the another page, I get an error (string reference
not set to an instance of String). I am 99% certain that this error occurs
because the form data from the original .html page is getting dropped.
My first inclination is to just stick that original form data into Session
variables, and recode so that the report params are pulling from those
Session variables instead of the original .html form variables. I'm pretty
sure this will work, and doesn't seem ugly to me.
But, I also know there is all sorts of fancy stuff in ASP.NET to manage
persistence, and maybe there is a better or cleaner way. Any suggestions?
Thanks,
Matt
Matt C. Guest
-
Urgent question regarding Session state in webservice
hi I wanted to know whether we can store something in Session objects in webservice.My windows application calls the webservice and i want the... -
newbie session question
Hi, Normally to start a session one would use session_start(); Is there a different command to do this if you're instead using the... -
Session state question
Inactivity, meaning no new request from the client. Note that this means that if the user sits at his browser for one minute, and then makes a new... -
Yes ... yet another question about Session State!! - Long
Hi all As my posting title suggests I'm having problems using InProc Session state in my ASP .NET app. I wrote a site for a friend which uses... -
Blatant newbie question - killing a session
Hi, this is my first question to the list and ... Yes I'm a newbie, verrry wet behind the ears. I am trying to set up a secured site under IIS. ... -
Kevin Spencer #2
Re: Newbie question: session state:
Instead of being 99% sure, why don't you set a breakpoint and make 100% sure
where and what the error is?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"Matt C." <canimal@my-deja.com> wrote in message
news:Xns93C0640DDD442canimalmydejacom@68.12.19.6.. .the> I am fairly new to ASP.NET so please forgive errors in terminology.
>
> I am using the CrystalReportsViewer control to display report data overbut> web. Data is posted to the .aspx page from a different form on a standard
> .html page. (I know ASP.NET likes to use postback to get form data, but I
> decided not to do that here.)
>
> The first page of the report loads fine, looks pretty, we're very happy,occurs> when I try to browse to the another page, I get an error (string reference
> not set to an instance of String). I am 99% certain that this errorpretty> because the form data from the original .html page is getting dropped.
>
> My first inclination is to just stick that original form data into Session
> variables, and recode so that the report params are pulling from those
> Session variables instead of the original .html form variables. I'm> sure this will work, and doesn't seem ugly to me.
>
> But, I also know there is all sorts of fancy stuff in ASP.NET to manage
> persistence, and maybe there is a better or cleaner way. Any suggestions?
>
> Thanks,
> Matt
Kevin Spencer Guest
-
Kevin Spencer #3
Re: Newbie question: session state:
Well, I'm glad you identified the problem. Using Session is tricky, however,
as Sessions time out. How are you transferring to the next page? You might
be able to pass the document through using Server.Transfer to transfer to
the next page, but before transferring, add the document to the HttpContext
of the current page. Then you can grab it out of the context in the next.
And you don't have to worry about Session time-outs.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"Matt C." <canimal@my-deja.com> wrote in message
news:Xns93C0C5E077660canimalmydejacom@68.12.19.6.. .is> "Kevin Spencer" <kevin@takempis.com> wrote in
> news:umh#6zHUDHA.2520@tk2msftngp13.phx.gbl:
>>> > Instead of being 99% sure, why don't you set a breakpoint and make 100%
> > sure where and what the error is?
> Well, I was more like 99.9% sure. Sometimes I'd rather fix what I think> the problem than spend time troubleshooting. :)
>
> I ended up setting the whole report document as a session variable, which
> solved the problem nicely, for anyone else in similar straits.
>
> Matt
Kevin Spencer Guest



Reply With Quote

