Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

Masterpage MulitView UpdatePanel Postback Problem!

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">
<ContentTemplate>
<asp:TextBox ID="textbox1" runat="server" Width="100px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="View1" OnClick="Button1_Click1" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:View>

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

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

</asp:MultiView>

</asp:Content>

0
pointeman
Asked:
pointeman
  • 2
1 Solution
 
tiagosalgadoCommented:
Try to put multiview control inside of an other UpdatePanel and set in all the UpdateMode property do Condition.
0
 
pointemanAuthor Commented:
0
 
pointemanAuthor Commented:
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..
<system.web>
<httpHandlers>
<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"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
 
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now