Intersoft Support Center

Use FlyPostBack and Standard PostBack Mode

WebButton provides two postback mode to be used, which are FlyPostBack and FullPostBack.

This topic will show you how to use FlyPostBack and standard PostBack mode.

To use FlyPostBack

  1. Right-click on WebButton control and choose Properties.
  2. Set PostBackMode to FlyPostBack and AutoPostBack to True.
  3. Put the following code in Clicked server-side event.
    C# Copy Code
    protected void WebButton1_Clicked(object sender, ISNet.WebUI.WebDesktop.WebButtonClickedEventArgs e)
    {
       if (WebButton1.IsFlyPostBack)
       {
          Label1.Text = "Fly PostBack has occured, there should be a javascript alert ";
          WebButton1.ClientAction.Alert("Fly Postback");
          WebButton1.ClientAction.RefreshModifiedControls();
       }
    }
    

  4. Run the project. When you click the button, it will show an alert since it is in FlyPostBack mode.

To use FullPostBack

  1. Right-click on WebButton control and choose Properties.
  2. Set PostBackMode to FullPostBack and AutoPostBack to True.
  3. Put the following code in Clicked server-side event.
    C# Copy Code
    protected void WebButton1_Clicked(object sender, ISNet.WebUI.WebDesktop.WebButtonClickedEventArgs e)
    {
       WebButton1.Text = "Full PostBack";
    }
    

  4. Run the project. When you click the button, it will perform FullPostBack and the button's label will be changed to Full PostBack.

Adding Command with WebButton

Theming UI with WebStyleManager

Previous Next