ChrisN need C# to VB conversion

Results 1 to 3 of 3

Thread: ChrisN need C# to VB conversion

  1. #1
    Join Date
    Dec 1969

    Default ChrisN need C# to VB conversion

    I am having a hard time trying to figure the last sample you gave me for the hyperlink in C, here is my code that I am using:<BR><BR>For i = 0 To C1WebGrid1.Items.Count - 1<BR> Dim col1 As String = C1WebGrid1.Items(i).Cells(0).Text<BR> Dim col2 As HyperLink = C1WebGrid1.Items(i).Cells(1).....<BR> HELP!!<BR> Dim chkSelect As CheckBox = C1WebGrid1.Items(i).Cells<BR> (2).FindControl("chkSelect")<BR><BR> txt1.Text = Convert.ToInt32(col1)<BR> txt2.Text = col2<BR> If chkSelect.Checked = True Then<BR> txt3.Text = "True"<BR> End If<BR>Next<BR><BR>Thanks for your time!!<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Conversions aren't..

    .. too difficult.<BR><BR>What&#039;s the original code?

  3. #3
    Join Date
    Dec 1969

    Default RE: ChrisN need C# to VB conversion

    assuming that cell 0 has a textbox, cell 1 a yperlink, and cell 2 a checkbox....<BR><BR>For i = 0 To C1WebGrid1.Items.Count - 1<BR>Dim col1 As String = CType(C1WebGrid1.Items(i).Cells(0), TextBox).Text<BR>Dim col2 As HyperLink = CType(C1WebGrid1.Items(i).Cells(1), HyperLink)<BR>Dim chkSelect As CheckBox = CType(C1WebGrid1.Items(i).Cells<BR>(2).FindControl ("chkSelect"), CheckBox)<BR><BR>txt1.Text = Convert.ToInt32(col1)<BR>txt2.Text = col2 &#039; I DO NOT KNOW WHAT YOU ARE DOING HERE...<BR>If chkSelect.Checked = True Then<BR>txt3.Text = "True"<BR>End If<BR>Next<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts