1
Vote

MessageBox does not work with UpdatePanel

description

Dear sir,
 
When I have an UpdatePanel from the ajaxtoolkit on the same page as your control
the messagebox does not work.
 
It works if I for example do: ScriptManager.GetCurrent(Page).RegisterPostBackControl(Button1)
 
Here is the page:
<body>
<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:UpdatePanel id="uppnlMembers" runat="server">
<ContentTemplate>
<div>

<asp:Button ID="Button1" runat="server" Text="Button" /> 

    <asp:Button ID="Button2" runat="server" Text="Button" />
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

</ContentTemplate>
</asp:UpdatePanel> 
</form>
</body>
 
And here is the code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
 
MessageBox.Show("Test.", DotNetSources.Web.UI.Buttons.Popup.Icon.Info)
 
End Sub
 
How can I solve this, I would like to use the message box without doing a postback?
 
Thank you in advance,
Thomas

comments