Hi,
I'm using asp.net and c# to build a web application.
I'm trying to display a popup message using the ModalPopup extender.
The message displays fine only if it sets in client side or in server side but inside Page_Load. Otherwise, it displays as empty.
the popup comes up without the message.
The thing is that i want to change the meesages when i call its show() method.
client side:
<asp:Panel ID="pnlMsg" runat="server" CssClass="modalPopup">
<asp:Label ID="lblModalMsg" runat="server" ></asp:Label>
<asp:Button ID="btnOk" runat="server" Text="OK" />
</asp:Panel>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="hidForModel" PopupControlID="pnlMsg" BackgroundCssClass="modalBackgroud" DropShadow="true" OkControlID="btnOk" Enabled="true"></asp:ModalPopupExtender>
<asp:HiddenField ID="hidForModel" runat="server" />
Server Side
this.lblModalMsg.Text = "My new popup!";
ModalPopupExtender1.Show();
Any ideas?
Thanks.