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

P

Peter Bradley

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
 
K

Kevin Spencer

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.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top