This is a migrated thread and some comments may be shown as answers.

Post back problems

1 Answer 27 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Najid Hanif
Top achievements
Rank 2
Najid Hanif asked on 09 Jul 2012, 02:06 AM
I have a page with tabs using RadMultiPage and ascx controls for each tab. One of the tabs contains a form. My code behind for that page has logic like this to load the form with the previously submitted data only when it is not a post back because the submit button preforms a post back.

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        UpdateFormWithDBData();
    }
 
}


If the tabbed page is brought up with the form tab as the initial tab, the form data loads on the page and works fine.

The problem is that if the page is brought up with another tab selected as the initial tab, when the user clicks on the tab with the form, the form data is not loaded because apparently clicking on the tab preforms a post back?? How do I get around this issue?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 12 Jul 2012, 08:36 AM
Hi Andy,

One suggestion I think of is that you use the server side event TabClick where you can explicitly call the UpdateFormWithDBData().

All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TabStrip
Asked by
Najid Hanif
Top achievements
Rank 2
Answers by
Kate
Telerik team
Share this question
or