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

  • SEARCH
  • Home
  • 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 624591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:13:01+00:00 2026-05-13T19:13:01+00:00

Since the automatic scaffolding of ASP.NET Dynamic Data Web Pages does most of the

  • 0

Since the automatic scaffolding of ASP.NET Dynamic Data Web Pages does most of the things I need to do for this project on its on, I’d like to use it as a basis.

Now, I like to add another link to the “Edit” “Delete” “Details” trio on my custom table view. I’d like it behave much like the “Delete” button, i.e. not call another page, but do something in the background (Here: Send an email.) and then refresh the view. Alas, I fail to understand how this “Delete” link works.

It is defined in the automatically generated code as

<asp:LinkButton ID="DeleteLinkButton" 
     runat="server" CommandName="Delete"
     CausesValidation="false" Text="Delete"
     OnClientClick='return confirm("Are you sure you want to delete this item?");'/>

What exactly happens here? Is there a method in the code somewhere named “Delete” (like used in the CommandName property)? What arguments are passed there? And: How would I call a custom method?

I tried stepping through it using the debugger, but it is easy to loose oneself in the LINQ Dataclasses, so I found nothing.

Thanks in advance!

  • 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-05-13T19:13:01+00:00Added an answer on May 13, 2026 at 7:13 pm

    The Delete CommandName is normally ties to an equivalent DeleteCommand on the same page under the datasource tag, for example:

     <asp:SqlDataSource ID="SqlDataSourcePending" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionStringPending %>" 
            DeleteCommand="DELETE FROM [CSNTable] WHERE [ID] = @ID" 
            InsertCommand="INSERT INTO [CSNTable] ([CSNDate], [CSNStatus], [CSNAuthor], [CSNSubject], [CSNMessage]) VALUES (@CSNDate, @CSNStatus, @CSNAuthor, @CSNSubject, @CSNMessage)" 
            SelectCommand="SELECT ID, CSNDate, CSNStatus, CSNAuthor, CSNSubject, CSNMessage FROM CSNTable WHERE (CSNStatus LIKE 'Pending')" 
            UpdateCommand="UPDATE [CSNTable] SET [CSNDate] = @CSNDate, [CSNStatus] = @CSNStatus, [CSNAuthor] = @CSNAuthor, [CSNSubject] = @CSNSubject, [CSNMessage] = @CSNMessage WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                .........etc...
    

    You can configure the delete command via the datasource control property, or via the page.

    As far as a new command, the usual way is to add a new linkbutton, change the command name to something that makes sense for what you want to do CommandName="EmailNotice".

    Then catch this button click commandname in the {YourDataTableName}_ItemCommand event by evaluating the eventargs.CommandName (e.CommandName), this is speaking very generally since I do not know what your custom data table is comprised of. When the e.CommandName==”EmailNotice”, then you do what you need.

    EDIT: Linq is a little different! You can refer to this MSDN article, but the main thing is using the GetCommand method

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

Sidebar

Related Questions

At my current client we have some legacy ASP.Net web site projects. I am
Since yesterday, I am analyzing one of our project with Ndepend (free for most
I'm working on automatic instanciation of an OWL model with Jena. Since every individual
since memcpy should be highly optimized nowadays, does it still make sense to optimize
Since I have no errors I don't know if this is the right place
Apparently, since Android SDK 17, builds generate an automatic class called BuildConfig and add
Here is the limitations: No public key file uploaded to server (since this may
I develop applications using the ASP.NET framework for my academic organization. We also have
Since WSDL specifies a section for type definitions, I wonder how this type definitions
I am using the MVC pattern in ASP.NET using service (BLL) and repository layers

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.