ASP.NET WebForms - . , -.
( ), - :
void ShowPanel(Panel panel)
{
firstPagePanel.Visible = false;
secondPagePanel.Visible = false;
...
lastPagePanel.Visible = false;
panel.Visible = true;
}
, , . , , ShowPanel.
, , - (, , - ). , , - ShowPanel(theRightPanel);, , , , , (, ). , . , .
ViewState ( ), , , . . , . , .
, , POST .
, , ( ) . , , . .ASPX, , "" . , . , ViewState .
Page_Load . , . OnInit ( ViewState).
I am also really trying to save the code from the ASPX page itself and really use Code Behind. This is one of the things that still makes ASP.NET MVC smell for me. In addition, you can do a lot to keep your code modular and allow testability and the like. This is a little beyond your question.