Edit this page

Cross-Page PostBacks

You can have your RadComboBox cause postbacks to a different web page from the one that it resides. To achieve this behavior, simply set the PostBackUrl property to the page that should handle the postback.

<telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" PostBackUrl="CrossPageCs.aspx"></telerik:RadComboBox>

Once in the second page, you can access the RadComboBox control on the previous page using the Page.PreviousPage property.


protected void Page_Load(object sender, EventArgs e)
{
    if (Page.PreviousPage == null) 
    { 
        Response.Redirect("Default.aspx"); 
    }

    RadComboBox comboBox = (RadComboBox)Page.PreviousPage.FindControl("RadComboBox1");
    Label1.Text = comboBox.SelectedItem.Text;
}


Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    If Page.PreviousPage Is Nothing Then
        Response.Redirect("Default.aspx")
    End If
    Dim comboBox As RadComboBox = CType(Page.PreviousPage.FindControl("RadComboBox1"), RadComboBox)
    Label1.Text = comboBox.SelectedItem.Text

End Sub

For a live example, see Cross Page Postback.