asp.net with C#
how to show the message box after saving the data in db(sqlserver)
??
earlier i was using javascript alert like this

<pre lang="xml">public static void ShowMessage(string strMessage,Page pgno)
{
    Label lbl = new Label();
    lbl.Text = &quot;&lt;script type='text/javascript' language='javascript'&gt;&quot; + Environment.NewLine+ &quot;window.alert('&quot; + strMessage + &quot;');&lt;/script&gt;&quot;;
    pgno.Controls.Add(lbl); 
}</pre>

but since putting update panel and asp:updateprogress Its not working.
Is there any ajax message box to use after saving the data.??
I know the "ConfirmButtonExtender"
but can we use it to show the confirmation message after saving the data into db(sqlserver)
Or better 1
thanks in advance

I have a common class and one of my method is this one

public static void Message(String message, Control cntrl)
        {
            ScriptManager.RegisterStartupScript(cntrl, cntrl.GetType(), "alert", "alert('" + message + "');", true);
        }

then any time i want to display a message i just call that method like this.

Message("Any message here", this);

hope that help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.