Hooligannes, thanks SO much for the reply. That definitely helped. [:)]
I'm so close now I can taste it...all I need to do now is figure out how to call my server-side method that sets the necessary session variable...I've tried the OnClick and OnClientClick methods and neither one actually set the session variable AND transferred
me to the page...they both did one or the other, but not both.
Any idea as to how I can set this session variable when the button is clicked and still have the PostBackUrl property set within the button tag?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 19, 2008 04:35 PM|LINK
IsCrossPagePostBack is true if the page is participating in a cross-page request; otherwise, false.
meaning if u have posted a from page A to Page B using PostBackUrl property then it will be true
When u do server.transfer it is not a CrossPagePostBack hence it will always be false.
You can use IsPostBack which is false when thefirst time the page is rendered and becomes true whenever there's a postback
Contact me
hooligannes9...
All-Star
16504 Points
2917 Posts
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 19, 2008 04:46 PM|LINK
Brian, you probably missed the part where it is explained that:
It might be important in the target page to determine whether the page was invoked from a cross-page posting or a Server.Transfer operation
I am suggesting you use a crosspage postback (client method) INSTEAD of Transfer (server method).
hooligannes9...
All-Star
16504 Points
2917 Posts
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 19, 2008 04:51 PM|LINK
Here's how to post from one page to a different one
brianwolfe86
Member
7 Points
50 Posts
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 20, 2008 04:05 AM|LINK
Hooligannes, thanks SO much for the reply. That definitely helped. [:)]
I'm so close now I can taste it...all I need to do now is figure out how to call my server-side method that sets the necessary session variable...I've tried the OnClick and OnClientClick methods and neither one actually set the session variable AND transferred me to the page...they both did one or the other, but not both.
Any idea as to how I can set this session variable when the button is clicked and still have the PostBackUrl property set within the button tag?
brianwolfe86
Member
7 Points
50 Posts
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 20, 2008 07:40 PM|LINK
Anyone? Please, I'm so close!
hooligannes9...
All-Star
16504 Points
2917 Posts
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 21, 2008 04:14 PM|LINK
See if this helps: How to: Pass Values Between ASP.NET Web Pages.
brianwolfe86
Member
7 Points
50 Posts
Re: Response.Redirect or Server.Transfer to force IsPostBack
Dec 22, 2008 06:13 PM|LINK
Awesome! I ended up using PreviousPage variables to get it done.
Thanks so much hooligannes!