asp.net - Set property of Page on Response.Redirect("Page.aspx") -
i using asp.net 3.5
c# 2008
.
i have master page in have grid view have itemcommand
event. master page has 2 child pages page1.aspx
, page2.aspx
.
now, page1.aspx
has 2 division let div1
, div2
.
by default div1
visible
, div2
remains hidden
.
now, requirement when redirect
page1.aspx
page2.aspx
, want div1
visible
. while, when click button masterpage's gridview
, itemcommand
event fired , redirect me page1.aspx
@ time need show div2
, want make div1
hidden.
i can pass query string on itemcommand
event while redirecting page1.aspx
using response.redirect("page1.aspx?displaydivtwo=true")
, don't
want follow such approach. other solution? tried set property before redirection not working.
apart session , querystring can use server.transfer
feature. can store data in request.items
property of page. there on page you're transferring to.
alternatively can use server.transfer feature in combination previouspage
directive in aspx page.
msdn has pretty long article on options avialable you. see:
and of course can use single page application javascript framework build concept of pages in client side, server 1 page server. can handle data going , forth through json services.
Comments
Post a Comment