Connecting Tech Pros Worldwide Help | Site Map

Differences between running in VS and calling an ASP.Net page froma browser

Peter Bradley
Guest
 
Posts: n/a
#1: Nov 17 '05
I have developed a little ASP.Net application that works fine when
started in the VS IDE. However when I call it from our "home" page it
doesn't work.

The page_load event handlers of two pages set a cookie for their
respective pages. Buttons on the pages check for the existence of their
cookie (in client-side onclick scripts) before proceeding. It has be
client-side for reasons I'll not bore you with unless you're really
interested.

It all works beautifully in the IDE, but the cookies are always empty
when retrieved from script in a page called in the "live" environment
(i.e. called from another page via an HTML link). They have their
expected values (of course) when retrieved in the same script where the
application has been started from the IDE - even when the page is not
the start page.

Is it something to do with being called from HTML links? Does the
page_load event not happen when pages are loaded in this way rather than
being "open"ed from code?

Thanks in advance

Peter

S. Justin Gengo
Guest
 
Posts: n/a
#2: Nov 17 '05

re: Differences between running in VS and calling an ASP.Net page froma browser


Peter,

Let us see some of the code.

--
S. Justin Gengo
Web Developer / Programmer

Free Code Library At:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


"Peter Bradley" <pbradley@uwic.ac.uk> wrote in message
news:bf3n0m$v4$1@news.swman.net.uk...[color=blue]
> I have developed a little ASP.Net application that works fine when
> started in the VS IDE. However when I call it from our "home" page it
> doesn't work.
>
> The page_load event handlers of two pages set a cookie for their
> respective pages. Buttons on the pages check for the existence of their
> cookie (in client-side onclick scripts) before proceeding. It has be
> client-side for reasons I'll not bore you with unless you're really
> interested.
>
> It all works beautifully in the IDE, but the cookies are always empty
> when retrieved from script in a page called in the "live" environment
> (i.e. called from another page via an HTML link). They have their
> expected values (of course) when retrieved in the same script where the
> application has been started from the IDE - even when the page is not
> the start page.
>
> Is it something to do with being called from HTML links? Does the
> page_load event not happen when pages are loaded in this way rather than
> being "open"ed from code?
>
> Thanks in advance
>
> Peter
>[/color]


Kevin Spencer
Guest
 
Posts: n/a
#3: Nov 17 '05

re: Differences between running in VS and calling an ASP.Net page froma browser


Is your ASP.Net app in the same domain as your "home" page? Cookies are
domain-specific.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.

"Peter Bradley" <pbradley@uwic.ac.uk> wrote in message
news:bf3n0m$v4$1@news.swman.net.uk...[color=blue]
> I have developed a little ASP.Net application that works fine when
> started in the VS IDE. However when I call it from our "home" page it
> doesn't work.
>
> The page_load event handlers of two pages set a cookie for their
> respective pages. Buttons on the pages check for the existence of their
> cookie (in client-side onclick scripts) before proceeding. It has be
> client-side for reasons I'll not bore you with unless you're really
> interested.
>
> It all works beautifully in the IDE, but the cookies are always empty
> when retrieved from script in a page called in the "live" environment
> (i.e. called from another page via an HTML link). They have their
> expected values (of course) when retrieved in the same script where the
> application has been started from the IDE - even when the page is not
> the start page.
>
> Is it something to do with being called from HTML links? Does the
> page_load event not happen when pages are loaded in this way rather than
> being "open"ed from code?
>
> Thanks in advance
>
> Peter
>[/color]


Closed Thread