Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using master and child page. In child page, i am using update panel and controls inside the update panel relating to the page. When a record is inserted or edited, i want a message to be displayed at the top of the page. The message should stay for few seconds and then be invisible. When the page is scrolled, the message should always reside at the top of the content page. Please help me on this.
Posted
Updated 9-Dec-12 18:31pm
v2
Comments
[no name] 9-Dec-12 23:09pm    
Provide your code, so that we can see whats happening in your app...
Rickin Kane 10-Dec-12 5:00am    
make sure your Message (Success , warning & error) are in Update Panel and sitting at Master Page
After that when ever you want to display the message , you need to find the Update Panel which covers the message section and Update it like upMesage.Update()

UISettings.ShowMessage("alert alert-success", "Buzz Deleted Successfully", divMessage, ltlMessage);
 
Share this answer
 
Step 1:
XML
Default.aspx

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
    <asp:Label ID="Label1" runat="server">60</asp:Label>
    <asp:Timer ID="Timer1" runat="server" Interval="1000"
        ontick="Timer1_Tick">
    </asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
Default.aspx.cs

protected void Timer1_Tick(object sender, EventArgs e)
{
    int seconds = int.Parse(Label1.Text);
    if (seconds > 0)
        Label1.Text = (seconds - 1).ToString();
    else
        Timer1.Enabled = false;
        lblMessge.Visible=False;
}

In the Above code let the Code Label be Visible=False
lblMessage :- refer to Step 2.


Step 2: Take a new Label for your message, Give its as follows

<asp:label id="lblMessage" runat="server" style=" text-align:Center" auto="><br mode=" hold=" />Your Mesage<
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900