Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspdotnet_website_programming thread: Viewstate["ReferrerUrl"] does not work


Message #1 by "Larkin Young" <youngld@j...> on Thu, 31 Oct 2002 02:46:31
Is anyone else getting the "Object reference not set to an instance of an 
object" when a page redirects using the Viewstate["ReferrerUrl"] property? 
Is there another simple way to do this? I can't seem to figure out why it 
the ReferrerUrl variable is always null.
thanx,
larkin
Message #2 by "Mike Gale" <info@d...> on Thu, 31 Oct 2002 17:12:13 +1300
Larkin Young wrote:
> Is anyone else getting the "Object reference not set to an instance
> of an object" when a page redirects using the
> Viewstate["ReferrerUrl"] property? Is there another simple way to do
> this? I can't seem to figure out why it the ReferrerUrl variable is
> always null. thanx,

I suggest running it through Visual Studio in the debugger to see what
values Viewstate[... is taking.  (assuming you are using VS)  You could
also dump the viewstate value into Trace output.  (I believe you can
debug rather well even without VS but I haven't done this myself.) 

From what I've seen the choice of Viewstate with Redirect is good.
(When a Server.Transfer is used the identity of the page after a
transfer is odd to say the least, and can inspire the use of more
complex logic to identify the referrer.)

I've also seen some odd requirements for those GET strings appended to
the URL in some cases (XHTML content and using the asp:image or the xml
control) the separator should be "&amp;" instead of "&"!  When you think
about it this makes some sense, but it surprised me when I first saw it.
Anyone else come across this?

Mike Gale, Decision Engineering (NZ) Ltd.



  Return to Index