I am using ASP.NET 3.5 with C# 2008.
I have a master page in which I have a grid view that have ItemCommand event. This master page has two child pages Page1.aspx and Page2.aspx.
Now, Page1.aspx has two division let us say div1 and div2.
By default div1 is visible and div2 remains hidden.
Now, the requirement is when I redirect to Page1.aspx from Page2.aspx, I want div1 visible. While, when I click any button from MasterPage's gridview, the ItemCommand event will be fired and that also will redirect me to Page1.aspx but at that time I need to show only div2 and want to make div1 hidden.
I can pass query string on ItemCommand event while redirecting to Page1.aspx using Response.Redirect("Page1.aspx?DisplayDivTwo=true"), but I don't want to follow such approach. Any other solution? I tried to set property before redirection but it is not working.