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 8920761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:21:35+00:00 2026-06-15T06:21:35+00:00

is there a way to save a detailview that is in Edit Mode from

  • 0

is there a way to save a detailview that is in Edit Mode from another button that is not part of the DetailView? In other words i have a detailview that is in edit mode and has the Save or the Update button but sometimes the users forget to click the Save button and they just go ahead and click another button that is the bottom of the page. I want to make sure the data they entered in the DetailView to be saved first when they click the other button.
I have this command names:

<EditItemTemplate>
                        <asp:Button ID="Button1" runat="server" CausesValidation="True" 
                            CommandName="Update" Text="Save Changes" />
                        &nbsp;<asp:Button ID="Button2" runat="server" CausesValidation="False" 
                            CommandName="Cancel" Visible="false" Text="Cancel" />

                    </EditItemTemplate>

                    <ItemTemplate>
                        <asp:Button ID="Button1" runat="server" CausesValidation="False" 
                            CommandName="Edit" Text="Save Changes" />
                    </ItemTemplate>  

this is what i have done after your suggestion:

  • 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-15T06:21:36+00:00Added an answer on June 15, 2026 at 6:21 am

    One way that may work, depending on the other button they click, is to have the other button click the update button before doing its action. However, if the other button posts back to the server, then one or the other may not work correctly.

    If the other button is an asp:Button, then you could add the following tag (please note, since you are adding javascript you will need to get the client ID of Button1 – I usually do this with a prefix because I can never remember how to get the ClientID inside of a server tag):

    OnClientClick="document.getElementById('MainContent_DetailsView2_Button1').click();"
    

    You need this prefix because ASP automatically creates unique IDs that are nested inside of the parent control.

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

Sidebar

Related Questions

Is there a way to save a cookie that is available on other site
Is there any way to save my .xml file to another directory other than
Is there a way to save application configurations and settings that user have customized
is there a way to save, not save as, from an online flex app
Is there a way to save a static password in a way that it's
Is there a way to save a configuration so that a hook may work
is there a way that I can save the model by using dictionary for
Is there a way to save a Matplotlib figure such that it can be
Is there a way to save a Unicode string into JSON that allows for
Is there a way to save text from a dynamic text field into some

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.