//================= <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>Untitled Page</title> <style type="text/css"> .round1 { -moz-border-radius: 10px; -webkit-border-radius: 10px; background: #FFF; border: 1px solid #FF8855; border-radius: 30px; font: small Verdana; height: auto; padding: 5px; width: 300px; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script src="autohide.js" type="text/javascript"></script> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div style="height: 261px"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Panel ID="Panel_MSG" runat="server" Visible="False"> <div id="alert" class="round1"> <asp:Label ID="lbl_msg" runat="server" Visible="False"></asp:Label> </div> </asp:Panel> <div style="text-align: center"> <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /></div> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <div style="text-align: center"> <asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click" /></div> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } public void dislyMSG(string MSGTXT) { Panel_MSG.Visible = true; lbl_msg.Visible = true; lbl_msg.Text = MSGTXT.ToString(); } protected void Button2_Click(object sender, EventArgs e) { dislyMSG("Hello................2"); } protected void Button1_Click(object sender, EventArgs e) { dislyMSG("Hello................1"); } }
<asp:updatepanel id="UpdatePanel1" runat="server" EnableViewState="true"></asp:updatepanel>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)