Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9060517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:15:00+00:00 2026-06-16T15:15:00+00:00

I want to add a Record Delete Message when the Delete button is selected.

  • 0

I want to add a Record Delete Message when the Delete button is selected. The message would appear for 5 seconds, then disappear. Here’s the code:

            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AllowSorting="True" DataSourceID="SqlDataSource1" 
                AutoGenerateColumns="False" DataKeyNames="ScheduleId">
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" />
                    <asp:BoundField DataField="SDate" HeaderText="SDate" SortExpression="SDate" />
                    <asp:BoundField DataField="STime" HeaderText="STime" SortExpression="STime" />
                    <asp:BoundField DataField="SNoPlaces" HeaderText="SNoPlaces" 
                        SortExpression="SNoPlaces" />
                    <asp:BoundField DataField="ScheduleId" HeaderText="ScheduleId" 
                        InsertVisible="False" ReadOnly="True" SortExpression="ScheduleId" Visible="false" />
                    <asp:BoundField DataField="STourId" HeaderText="STourId" SortExpression="STourId" Visible="false" />
                    <asp:BoundField DataField="TName" HeaderText="Tour Name" SortExpression="TName" /> 
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ChinatowndbConnString %>" 
                DeleteCommand="DELETE FROM Schedule WHERE (ScheduleId = @ScheduleId)" 
                SelectCommand="SELECT SDate, STime, SNoPlaces, ScheduleId, STourId, TName FROM Schedule INNER JOIN Tour ON Schedule.STourId = Tour.TourId">
                <DeleteParameters>
                    <asp:Parameter Name="ScheduleId" />
                </DeleteParameters>
            </asp:SqlDataSource>

Regards
Tea

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:15:01+00:00Added an answer on June 16, 2026 at 3:15 pm

    Use this gridview event:

    protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
    {
        LabelMsg.Text = "Record Deleted";
    }
    

    I would use jQuery to always Fadeout the LabelMsg element on $(document).ready(). So no matter what you put in it, from the server side, it will fade out in the time you decide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've following Grid to display data, now when I want to add new record
When I add a new record I want SQL Server to automatically add a
I have a website built with ASP.NET (3.5) and want add some level of
I want to add a record dynamically. When I insert action = add.php for
I have a 10 checkboxes, when i want to delete the appropriate record I
I am learing Linq-to-SQL. I want to add a record, but get an exception
I want to Delete and Insert the Record but I have the error which
I want make CRUD PrimeFaces dataTable with add, filter, edit, delete, pagination features. I
Everytime users did something like add, delete or edit data. I want to keep
I want to add a variable number of records in a table (days) And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.