Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2005, 11:38 PM
Authorized User
 
Join Date: Jun 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB to C# conversion

can anyone plz convert this VB code to C# code?
This code is meant for confirm deletion of an item from data grid
Thanks in advance.


Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles DataGrid1.ItemDataBound Dim l As LinkButton If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then l = CType(e.Item.Cells(4).FindControl("cmdDel"), LinkButton) l.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');") End If End Sub
 
Old June 27th, 2005, 02:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you want other people to do your work, you could at least spend some time trying to format this code. Right now it's impossible to read making it hard to convert it.

That said, did you try Google before you posted this? There are many converters available on the web.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 29th, 2005, 04:52 AM
Authorized User
 
Join Date: Jun 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah got one ...

http://www.developerfusion.com/utili...btocsharp.aspx

 
Old June 29th, 2005, 08:12 PM
Authorized User
 
Join Date: Feb 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try downloading the demo/trial versions of some of the commercial VB.NET to C# converters. The on-line converters are notoriously inaccurate.








Similar Threads
Thread Thread Starter Forum Replies Last Post
File Conversion in VB.net? yuvin Visual Studio 2005 1 February 5th, 2007 03:36 PM
Help w/conversion from C# to VB.NET kwilliams VB.NET 9 October 16th, 2006 12:06 PM
conversion of vb to C# code KamalRaturi ASP.NET 2.0 Professional 6 September 13th, 2006 04:35 AM
DotNet conversion for ADODB.Field in VB seby General .NET 0 December 1st, 2004 08:11 AM
vb6 to vb.net conversion question tomz VB.NET 2002/2003 Basics 2 January 28th, 2004 10:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.