T
T
Therapyx2015-09-14 01:01:30
JavaScript
Therapyx, 2015-09-14 01:01:30

How to make a block that appears on the toaster after sending a complaint (with timing)?

After you send a complaint to the toaster, such a green block appears between the general content and the search engine. Which disappears after a couple of seconds.
How can this be done based on an asp.net c# project where it should appear after an UpdateRow or InsertRow in a GridView table? For example, I updated the line - the message "Line updated" came out, etc.

An example of a newline insert.

<asp:Button ID="btnInsert" CssClass="button" runat="server"  OnClick="btnInsert_Click" />

protected void btnInsert_Click(object sender, EventArgs e)
    {
            using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["DB_Name"].ConnectionString))
            {
                SqlCommand cmd = new SqlCommand("Procedure_Name", cn);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Connection.Open();
                 Параметры....
                    try
                    {
                        int rows = cmd.ExecuteNonQuery();
                    }
                    catch (Exception ex)
                    {
                        Label1.Text = ex.Message;
                    }           
            }

After this kind of function, a new block with a timer should appear, but again, the problem is that you still need to take into account that the update or insert was successful. What's the best way to check all this? :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Greg Popov, 2015-09-16
@Gregpopov

I'm not familiar with Sharp, but you need to look towards the analogue from js - setTimeout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question