Masterpage MulitView UpdatePanel Postback Problem!

Posted on 2008-11-12
Last Modified: 2012-05-05
I created a Multiview (3 views), Textboxes and Button inside an UpdatePanel. It worked fine until I included the code in a Masterpage site. Now I get page postback everytime I click any button. As advised, I have since used a seperate UpdatePanel for each View, but still same problem. Here's a simplified code example...

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<asp:MultiView ID="MultiView1" runat="server">

<asp:View runat="server" ID="view1">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:TextBox ID="textbox1" runat="server" Width="100px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="View1" OnClick="Button1_Click1" />

<asp:View runat="server" ID="view2">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<asp:TextBox ID="textbox2" runat="server" Width="100px"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="view2" OnClick="Button2_Click" />

<asp:View runat="server" ID="view3">
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<asp:TextBox ID="textbox3" runat="server" Width="100px"></asp:TextBox>
<asp:Button ID="Button3" runat="server" Text="view3" OnClick="Button3_Click" />



Question by:pointeman
    LVL 8

    Expert Comment

    Try to put multiview control inside of an other UpdatePanel and set in all the UpdateMode property do Condition.

    Author Comment


    Accepted Solution

    OKay, found the answer after conducting a stacktrace:
    The 'ScriptResource.axd' path was missing in the web.config
    So, now everything works fine. I've been fighting this all day..
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now