Delete Message "Ok, Cancel" VB.NET

Hi I'm trying to display a message box to confirm the deletion of a record in a datagrid.

Thanks
-1
Ad_
7/7/2005 3:00:21 PM
asp.net.presentation-controls 72751 articles. 2 followers. Follow

2 Replies
665 Views

Similar Articles

[PageSpeed] 31

You can do that in the ItemCreated event:

Sub dg_ItemCreated(Sender as Object, e as DataGridItemEventArgs) handles dg.ItemCreated
   If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem then
      Dim btn as Button = CType(e.Item.FindControl("btnDeleteID"), Button)
      btn.Attributes.Add("Onclick", "return Javascript:Confirm('Are you sure?')")
   End If
End Sub
Sonu Kapoor [MVP]
Feel free to ask me any .NET question | Ajax Data Controls Forum
1
SonuKapoor
7/7/2005 4:39:58 PM
Thankyou!
1
Ad_
7/7/2005 4:41:33 PM
Reply:

Similar Artilces:

VB.NET ":=" ?
 Hi, what is this operator, ":=" ? I found it has something to do with "expression" , but not sure how to use it. I googled and didn't find any information.  Here you go: http://msdn.microsoft.com/en-us/library/51wfzyw0(VS.71).aspxThanks, EdMicrosoft MVP - ASP/ASP.NET...

.NET 2 "FileUpload" control (or html "file"-type input)
I want to change the button on the control to be a specific colour i.e. other than the default grey. However, I can't find an attribute for this. The background attribute changes the input box area colour. Is there a way to change the colour of the button? Thanks http://www.quirksmode.org/dom/inputfile.html   NC...  ...

Calling A VB.NET Function in TextBox1.Attributes.Add("OnKeyUp", "search_log()")
Please tell me where i am wrong.  I am trying to call a vb.net function in attributes.add("OnKeyUp", "search_log()")   Function search_log() some codes here End Function   There is an error that "object expected"   Please Help JavaScript can not call a function that is serverside code. It can only call JavaScript code. If you want to call code on the server, you should ook into using the Ajax controls. Eric Pascarello.com | Twitter epascarello | LinkedIn Hi, I suggest you use pagemethod. For more infomation, see http...

need a "Date Modified: <date>" control for vb aspx.net 3.5
Sounds simple!  I just want a thing in my footer that says, "Date Modified: <date>" where <date> is the actual date the file was modified. I posted this question in the beginner's area but the suggested solutions do not work. I tried adding a Label control on my page, thus: <asp:Label ID="Label1" runat="server"></asp:Label>then in my masterpage.master.vb I have: Partial Class MasterPage    Inherits System.Web.UI.MasterPage    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System...

superreview cancelled: [Bug 323109] deleted attachment: "Deleted: " vs "Deleted:", not localizable : [Attachment 210044] proposed fix
Magnus Melin <mkmelin+mozilla@iki.fi> has cancelled David Bienvenu <bienvenu@nventure.com>'s request for superreview: Bug 323109: deleted attachment: "Deleted: " vs "Deleted:", not localizable https://bugzilla.mozilla.org/show_bug.cgi?id=323109 Attachment 210044: proposed fix https://bugzilla.mozilla.org/attachment.cgi?id=210044&action=edit ...

How to add .Net Framework 3.5 to IIS Properties tab? How to show "shortcut" or "Confiure" 3.5 icon on Control Panel?
I have installed VS 2008 Express, SQL 2005 Express and .Net Framework 3.5.   On IIS Properties, the web sites I have created, on the ASPnet tab of the Properties dialog desktop, clicking the NetFramework dropdown arrow, showed only the .NetFrameowrk 1.1 and 2.0.  How can I add the .Net Framework 3.5 to the dropdown list?   Why I can not see the "short-cut" or "Configuration"icon for .NetFramework 3.5?  Only those for 1.1 and 2.0 were shown.  Thanks,  Hi Read the Following,What exactly is ASP.NET 3.5 ? Take a look at the v3.5 framework...

message history ("deleted on..."/"opened on..." attributes)
Hi. Often I want to recall when a message was viewed for the first time, or when was it deleted/moved to another folder. Does thunderbird keep track of such attributes? If so, how do I access it? If not, is there any addon that can fulfill such a task? 10x, Amit ...

C#.Net "Double" and "double" When/Where to use?
Hi all     Please let me know the difference between "Double" and "double" in c#.Net (I understand that "Double" is structure      and "double" is an instance to that structure) differences if any thing else.     Also the context in which both has been used.(When/Where to use both). thanks all...      hi,my brains says Double is reference type & double is value type.regards,satishKind Attn: If a reply to your post helped you, kindly mark it as Answered.__________...

"Yes"/"No" Message Box Untied to a Control
I need to be able to prompt the user of an ASP.NET page for a “Yes” or “No” answer depending on levels of certain variables. This requires a message box, similar to a JavaScript client side confirm message, but not tied to any control. Further processing on the page is to depend on the answer returned. I have not been able to find any way to do this. Help would be most appreciated. -wire up your prompt to a button click or something btn.attributes("onclick")= "javascript:myFunction()" -in your javascript function I would set the value from your prompt to a hidde...

Where can I get the images used by VS2005 for "Edit, Update, Cancel"; "Select"; and "Delete"
I'm looking for small, elegant images to use in the CommandField of a GridView for Edit, Delete, and Select. Visual Studio 2005 uses images that would be perfect but I don't know where to get the files for these images so I can use them in my own project. From a GridView's Smart Tag, go to GridView Tasks | Edit Columns | Available Fields. Under CommandField there is a sub-tree with three images that are just what I need: "Edit, Update, Cancel"; "Select"; and "Delete". Does anyone know where I can find the files for these three images (.bmp, ,gif, etc.)?     I d...

"Do nothing" timer in VB .NET
Hi folks,I'm developing an application where I need to implement a "Do nothing", or settling, timer in VB .NET. Can someone help me out on a quick implementation of this type of timer?Thanks for your help! I am not entirely sure what a "Do Nothing" timer is but this code will process, then go to sleep and do nothing for 10 seconds, then wake back up and continue execution.'doing code stuff'i need to sleepSystem.Threading.Thread.Sleep( 10 * 1000 )'after 10 seconds this code will execute.The Sleep method is in milliseconds, so 10 seconds time 1000 milliseconds per second....

"\n" in C#, in VB.NET ?????
Hi there!! I want to use the equivelent of "\n" in java .. so that code will take me to the next line. i try to do this in VB and found more than one key word I found "ControlChars.NewLine" and "ControlChars.CrLf".. Can you please tell me what is the difference and which one is the right conversion of the java or C# Thank you for reading this messageFadil Alnassar www.fadilalnassar.com | FREE Nodil Tab Controlhttp://www.mefranchising.com In VB.NET, vbcrlf (Carriage return line feed) should do the job. CR is for Carriage return; the ascii \r character....

'Entropy', a "net inside the net" ?
Just tumbled upon this, maybe old news. Comments welcome (f/u grc.privacy) : Entropy is a software, which creates a "net inside the net" (inside the internet) for its users. This software can be used both by *nix- and Windows-users. Entropy is "Free Software" (under GPL) and can be downloaded here: http://entropy.stop1984.com/ -- Ninho On Wed, 12 Sep 2007 12:03:30 +0200, in grc.linkfarm,grc.privacy, Ninho wrote: > Just tumbled upon this, maybe old news. Comments welcome (f/u grc.privacy) : > > Entropy is a software, which creates a "ne...

missing method "asn" in "Net::LDAP::LDIF"
hi! I just tried to work a bit with Net::LDAP::LDIF but I got an error during $ldap->add: Can't locate object method "asn" via package "Net::LDAP::LDIF" at /usr/lib/perl5/site_perl/5.8.5/Net/LDAP.pm line 444, <DATA> line 225. I recently installed Convert::ASN1 0.19 an perl-ldap-0.33. Any hints? Thanks a lot! -- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ] Hi, On Tuesday, 13. September 2005 2...

Web resources about - Delete Message "Ok, Cancel" VB.NET - asp.net.presentation-controls

Resources last updated: 12/12/2015 6:06:56 PM