Detecting the "Update" button was pressed in a detailsview "Edit Mode"

I have a detailsview that has editing turned on.  So, of course when the user clicks edit, the buttons displayed are are changed to "Update" and "Cancel".   I need to perform additional steps once the update is sent. For instance, I'm going to have it email out changes on top of updating the database.  How do I detect in my code behind that this particular button was pressed.

 I've done several searches for a solution here and elsewhere, but nothing seems to come up to explaine what I'm looking for.  So, if anyone can point me in the right direction as to where I can find info on this, or explain how to do it, I would greatly appreciate it!
 

0
JabCoR
1/25/2008 9:10:44 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies
803 Views

Similar Articles

[PageSpeed] 34
Get it on Google Play
Get it on Apple App Store

Try to search DetailsView's OnItemUpdating event:

Here is a link with samples from MSDN:

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.detailsview.itemupdating.aspx

 


Limno

0
limno
1/25/2008 9:50:26 PM

Will have to do some reading, but this looks like what I was looking for, thank you. 

0
JabCoR
1/26/2008 12:06:10 AM
Reply:

Similar Artilces:

move the "Edit" "New" button to top of the detailsview control
Hi:I can move the pager control to the top of my detailsview control, (there is a setting: pager position), but I don't see any setting for the "Edit" "New" command control.Any suggestion?ThanksJT You can arrange the fields within a DetailsView such as the command field is on top like I did in this demo: http://webswapp.com/categories/ASPNET2/CascadingLists/DetailsView.aspxHTH,Phillip Williams,http://www.webswapp.com  thank you, webswapp, nice work!...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

Detecting if "Back Button" and "Menu Button" Exist [Edit]
Hi: I am developing an app that is going to run on both iOS and Android. The iOS version will have a software back button and menu button to go back to previous page and show a menu, but I need to detect if hardware back and menu button (or the soft back button and menu that Android provides in tablets) exist and if it does hide these buttons that does not need to be there (I need the real state). I have looked at IFMXVirtualKeyboardService but it does not provide any way of detecting the hardware keys. Is t here a Firemonkey way of detecting the existence of hardware back and menu button? ...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

no "enable editing" "enable deleting" "enable updating"
In my visual studio 2005 beta1,there is no "enable editing", "enable deleting", "enable updating"options. why? is the vision wrong??thanks! Which control are you talking about?/Fredrik Normén - fredrikn @ twitterMicrosoft MVP, MCSD, MCAD, MCTASPInsidersMy Blog "gridview" control!! I have, so you should also have it if you create a data source for the GridView control in the design view and make sure you have specified the Insert and Update Command for the DataSource. You can also add a CommandField to the GridView columns <asp:CommandFi...

FormView Control, and "Click" event of "Update" button
Hi Folks,I have a question relating to attaching code to the "Click" event of the default "Update" button within the EditTemplate of the FormView control.Without coding the "Click" event, the database update of the modified record works fine.However, as soon as I add some code to the event, as follows:protected void UpdateButton_Click(object sender, EventArgs e){Response.Redirect("Default.aspx");}... the database update is not done.Do I need to do some manual coding to do the update via the ObjectDataSource in this case?If so, can anyone advise what? ...

"Before Update" and "After Update Of" triggers
Hi all, In a row-level before update trigger I set the value of a column ("SomeColumn) to some value (the value is only changed by this trigger, not by the update statement itself) Now I notice that the row-level trigger defined as "after update of SomeColumn" doesn't fire when I change the value of this column in the before update trigger. It does fire (as expected) when the change comes from the update statement itself) Questions: - Is this expected behaviour? - how can I uniformly trigger a change of a column wether set by the update statement or by...

No "Update" or "Delete"!
Hi,I am using the dataset wizard to connect to a SQL database. The wizard creates my dataset and generates  "Select" and "Insert" statements but no "Update" or "delete". What can be the reason? By the way, this happens only on certain tables and not on others. I just can't figure out what the difference between these tables is. And, they all have a primary key. Actually I found this error before, running the configuration for the table again gives me that, sometimes I had to delete the table and start again. Hope this helps, let me...

Get "Mail"/"Get "News" / "Write"/"Post" buttons?
If the "Get Mail" button text changed to "Get News", and "Write" changed to "Post" when TB's in the news-reading mode, it would save me and probably others from constantly forgetting to make the change before proceeding. :-) Or is there an extension to do this which I don't know about? Thanks! Bob Bob P wrote: > If the "Get Mail" button text changed to "Get News", and "Write" > changed to "Post" when TB's in the news-reading mode, it would save me > and probably others...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

"Me" is better than "You"
Yes I know, strings are frozen. But let me talk about it, I really can't get through the idea of a PC talkin to me. I consider my PC as an extension of myself, not a dumb companion who addresses Me as You. Yes there are times when I get angry with Him while I work and get wrong calculations etc.., but it really is my fault, Me using wrong istructions and eventually wanting to find someone else to blame, but it's Me. And yes, I consider Thunderbird my mail program, reading my mail on my PC as Me. So I personally like to have Me in the header bar as a compact address ...

"To" and "From" missing
When I print emails, the words "To" and "From" are blank, even though the "To" name and "From name (addresser, addressee) do show up. This is not a problem for other users on my system. Suggestions In mailbox right click, view. On the message window, right click and choose print options. Make sure print header is checked. -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** > In mailbox right click, view. On the message window, right click and > choose print options. Make sure prin...

"Using" or "With"
Hi all Please can someone enlighten to me as regards the difference with the "Using" and "With" statement when accessing data - which is better, what are the limitations and/or any pointers. Many thanks. Regards DaveDavid WinchesterPlease mark as answer if this is the solution.  using gives you the ability to use the connection and it closes the connection directlly after you finish using it. and there is no need to try- cach - finaly. there is no limitation on using USING keywordMuhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I have a dataobject the re...

Web resources about - Detecting the "Update" button was pressed in a detailsview "Edit Mode" - asp.net.presentation-controls

Resources last updated: 12/12/2015 4:37:47 PM