Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Back Button Of Browser with ASP.NET application


Message #1 by "dHABUD" <dhabud@h...> on Mon, 14 Oct 2002 22:03:25
Hi

I have a form/Wizard with postback. How do i associate the back button of 
browser so that user can go to previous veiw of the application.

Thanks a Lot in Advance
Dhabud
Message #2 by Ali Ahmad H <aheryana@b...> on Tue, 15 Oct 2002 09:04:00 +0700
this is my tricky :

i'm using 2 or more panel,
panel1 is for default view with visible view = true and panel2 is for next 
view with visible = false (this is a default condition when page is loaded 
for the first time)
if you click the next button, change the panel's visible properties (panel1 
visible = false, panel2 visible = true) and vice versa if you click the 
previous button (panel1 visible = true, panel2 visible=false).

or you can use this method : (from duwamish, using C#)

private void ShowPanel(Panel panel, bool visible)
{
         IValidator validator;

         foreach (Control ctrl in panel.Controls)
         {
         //check to see if its a validator
         if ( ctrl is IValidator)
                 {
                         validator = (IValidator)ctrl;
                         ctrl.Visible = visible;
                         if (!visible)
                         {
                                 validator.Validate();
                         }
                 }
         }
         panel.Visible = visible;
}

regards,
-ali-
http://www.csharpindonesia.net
http://www.aspxindonesia.net


At 10:03 PM 10/14/2002 +0000, you wrote:
>Hi
>
>I have a form/Wizard with postback. How do i associate the back button of
>browser so that user can go to previous veiw of the application.
>
>Thanks a Lot in Advance
>Dhabud

Message #3 by "dHABUD" <dhabud@h...> on Tue, 15 Oct 2002 16:44:48
Hi

I was talking about associating the back Button of the BROWSER with 
previous view on the page/Form.

I have two panels but thing is i am creating dynamic controls on the panel 
2. and with the next button on my application the user can view the next 
question just as wizard. All these questions pop up on panel2 one by one.

But now the question is how do i associate  BACK  button of brower(<---) 
with the PREV Button of my application.

Thanking you in Advance

Dhabud


> this is my tricky :

i'm using 2 or more panel,
panel1 is for default view with visible view = true and panel2 is for next 
view with visible = false (this is a default condition when page is loaded 
for the first time)
if you click the next button, change the panel's visible properties 
(panel1 
visible = false, panel2 visible = true) and vice versa if you click the 
previous button (panel1 visible = true, panel2 visible=false).

or you can use this method : (from duwamish, using C#)

private void ShowPanel(Panel panel, bool visible)
{
         IValidator validator;

         foreach (Control ctrl in panel.Controls)
         {
         //check to see if its a validator
         if ( ctrl is IValidator)
                 {
                         validator = (IValidator)ctrl;
                         ctrl.Visible = visible;
                         if (!visible)
                         {
                                 validator.Validate();
                         }
                 }
         }
         panel.Visible = visible;
}

regards,
-ali-
http://www.csharpindonesia.net
http://www.aspxindonesia.net


At 10:03 PM 10/14/2002 +0000, you wrote:
>Hi
>
>I have a form/Wizard with postback. How do i associate the back button of
>browser so that user can go to previous veiw of the application.
>
>Thanks a Lot in Advance
>Dhabud


  Return to Index