Intersoft Support Center

Use WebFlyPostBackManager with Intersoft Controls

WebFlyPostBackManager is tightly integrated with other Intersoft controls.

This topic will show you how to use WebFlyPostBack with Intersoft controls.

To use WebFlyPostBackManager with Intersoft Control

  1. Add a new page in your project and named it as UsingWebFlyPostBackManagerWithIntersoftControl.aspx.
  2. Drag WebFlyPostBackManager, WebCombo and WebGrid controls into the WebForm.
  3. Right-click on WebCombo control and choose WebCombo.NET Designer.
  4. Go to Columns and Rows section and create a new column.



  5. Go to Rows tab, add Customers as a new row and click OK.



  6. Go to Advanced Settings and set AllowAutoPostback to True.
  7. Bind and customize WebGrid using InitializeDataSource and PrepareDataBinding server-side events like following:
    C# Copy Code
    protected void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
    {
       if (WebCombo1.Text == "Customers")
       {
          dsNorthwind.CustomersDataTable dt = new dsNorthwind.CustomersDataTable();
          dsNorthwindTableAdapters.CustomersTableAdapter da = new dsNorthwindTableAdapters.CustomersTableAdapter();
          da.Fill(dt);
          e.DataSource = dt;
       }
    }
    
    protected void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
    {
       if (WebCombo1.Text == "Customers")
       {
          WebGrid1.RootTable.DataKeyField = "CustomerID";
          WebGrid1.RetrieveStructure();
       }
    }
    

  8. Call RebindDataSource() using ValueChanged WebCombo server-side event.
    C# Copy Code
    protected void WebCombo1_ValueChanged(object sender, ISNet.WebUI.WebCombo.ValueChangedEventArgs e)
    {
       WebGrid1.ClearCachedDataSource();
       WebGrid1.RequiresUIRefresh = true;
       WebGrid1.RebindDataSource();
    }
    

  9. Now, create a page with WebFlyPostBackManager control included in it.
  10. Right-click on WebFlyPostBackManager control and choose Properties.
  11. Set EnableUIMode to True and locate ServiceURL into UsingWebFlyPostBackManagerWithIntersoftControl.aspx.
  12. Expand FlyPostBackSettings and set the following properties.
    Property Value
    PostControlState True
    PostHiddenFields True
    PostInputControls True
    PostViewState True

  13. Add ISNet.WebUI.WebDesktop as reference and configure WebFlyPostbackManager at server side.
    C# Copy Code
    using ISNet.WebUI.WebDesktop;
      
    WebFlyPostBackListener listener = null;
    
    protected void Page_Load(object sender, EventArgs e)
    {
       listener = new WebFlyPostBackListener(this);
    }
                            

  14. Run the project.
Previous Next