Click here to Skip to main content
15,921,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have page1.aspx with a button on click of this buttion i am opening another page2.aspx
where user selects some asp:linkbutton and i have to send back this info to the page1.aspx
and further logic will be executed

i am using cross page back

1. with page1.aspx as previouspage and page2.aspx as source page
2. on click of save page2.aspx got opened and user selects asp:linkbutton
3. the page got cross posted back to page1.aspx
but here always the IsCrossPagePostBack is always false.


cross page posting is only fwd?
suggest some solution
Posted

1 solution

Maybe have a look here

http://www.alexthissen.nl/blogs/main/archive/2006/09/13/beware-the-iscrosspagepostback-property.aspx[^]




If you evaluate the IsCrossPagePostback like so:

C#
if (this.Page.IsCrossPagePostback)


you will always get false, even if you are sure that it should be true. Instead, you should check the property like this:

C#
if (this.Page.PreviousPage != null &&
    this.Page.PreviousPage.IsCrossPagePostback)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900