Cross Page PostBack

added by ashishsarda99
8/10/2010 6:36:08 AM

1 Kicks, 70 Views

In web development, many times we come across following situation We need to redirect to new page, but we also need some data which belongs to previous page, we might need to display the data on new page. So what things we normally do are, eighter keep the data in session, or in hidden variable, or put data in application variable, or again run the code to get same data and bind it to similar kind of control. I think this is something which we can avoid by simply applying logic of Cross Page Postback, where we can directly identify the controls whose value we need to display on new page. E.g. step1--> We have Grid View on say PAGE1.aspx and we redirect to PAGE2.aspx. step2--> On PAGE2.aspx we need same Grid View to Display. For this we will probably use traditional ways to maintain the grid. Now what if I say we can directly access grid which is already filled with data, and simply put the same grid on PAGE2.aspx. This sounds very simple. And it is very simple. For better understanding just check out following code which I have written on PAGE2.aspx check out following link for more details http://aspdotnetmatters.blogspot.com/2010/08/cross-page-postback.html


0 comments