Translate C# to VB2005

Discussion in 'ASP .Net' started by dancer, May 21, 2007.

  1. dancer

    dancer Guest

    Who can translate this code into VB.net?


    On May 19, 4:48 am, "dancer" <> wrote:
    > Using VB2005 and Asp.net
    >
    > I have a CheckBoxList. One of the items needs to be user-defined. Is it
    > possible to put a text box WITHIN a CheckBoxlist?
    >
    > Meaning - if the user checks "Other" he would also type his definition of
    > other.


    Hi....


    here it goes

    for (int i = 0; i < 15; i++)
    {
    if( (i%2) == 0)
    CheckBoxList1.Items.Add(@"<input type='text'
    value='yahoo' onClick=""return false;""></input>");
    else
    CheckBoxList1.Items.Add(i.ToString());
    }


    Thanks
    Masudur
    dancer, May 21, 2007
    #1
    1. Advertising

  2. dancer

    sloan Guest

    This?

    http://authors.aspalliance.com/aldotnet/examples/translate.aspx




    "dancer" <> wrote in message
    news:eh%23zPD%...
    > Who can translate this code into VB.net?
    >
    >
    > On May 19, 4:48 am, "dancer" <> wrote:
    > > Using VB2005 and Asp.net
    > >
    > > I have a CheckBoxList. One of the items needs to be user-defined. Is

    it
    > > possible to put a text box WITHIN a CheckBoxlist?
    > >
    > > Meaning - if the user checks "Other" he would also type his definition

    of
    > > other.

    >
    > Hi....
    >
    >
    > here it goes
    >
    > for (int i = 0; i < 15; i++)
    > {
    > if( (i%2) == 0)
    > CheckBoxList1.Items.Add(@"<input type='text'
    > value='yahoo' onClick=""return false;""></input>");
    > else
    > CheckBoxList1.Items.Add(i.ToString());
    > }
    >
    >
    > Thanks
    > Masudur
    >
    >
    sloan, May 21, 2007
    #2
    1. Advertising

  3. Actually, "this" can't.
    --
    David Anton
    www.tangiblesoftwaresolutions.com
    Instant C#: VB to C# converter
    Instant VB: C# to VB converter
    C++ to C# Converter: converts C++ to C#
    Instant C++: converts C# or VB to C++/CLI


    "sloan" wrote:

    >
    > This?
    >
    > http://authors.aspalliance.com/aldotnet/examples/translate.aspx
    >
    >
    >
    >
    > "dancer" <> wrote in message
    > news:eh%23zPD%...
    > > Who can translate this code into VB.net?
    > >
    > >
    > > On May 19, 4:48 am, "dancer" <> wrote:
    > > > Using VB2005 and Asp.net
    > > >
    > > > I have a CheckBoxList. One of the items needs to be user-defined. Is

    > it
    > > > possible to put a text box WITHIN a CheckBoxlist?
    > > >
    > > > Meaning - if the user checks "Other" he would also type his definition

    > of
    > > > other.

    > >
    > > Hi....
    > >
    > >
    > > here it goes
    > >
    > > for (int i = 0; i < 15; i++)
    > > {
    > > if( (i%2) == 0)
    > > CheckBoxList1.Items.Add(@"<input type='text'
    > > value='yahoo' onClick=""return false;""></input>");
    > > else
    > > CheckBoxList1.Items.Add(i.ToString());
    > > }
    > >
    > >
    > > Thanks
    > > Masudur
    > >
    > >

    >
    >
    >
    =?Utf-8?B?RGF2aWQgQW50b24=?=, May 22, 2007
    #3
  4. (via Instant VB)
    For i As Integer = 0 To 14
    If (i Mod 2) = 0 Then
    CheckBoxList1.Items.Add("<input type='text'" & ControlChars.CrLf &
    "value='yahoo' onClick=""return false;""></input>")
    Else
    CheckBoxList1.Items.Add(i.ToString())
    End If
    Next i

    --
    David Anton
    www.tangiblesoftwaresolutions.com
    Instant C#: VB to C# converter
    Instant VB: C# to VB converter
    C++ to C# Converter: converts C++ to C#
    Instant C++: converts C# or VB to C++/CLI


    "dancer" wrote:

    > Who can translate this code into VB.net?
    >
    >
    > On May 19, 4:48 am, "dancer" <> wrote:
    > > Using VB2005 and Asp.net
    > >
    > > I have a CheckBoxList. One of the items needs to be user-defined. Is it
    > > possible to put a text box WITHIN a CheckBoxlist?
    > >
    > > Meaning - if the user checks "Other" he would also type his definition of
    > > other.

    >
    > Hi....
    >
    >
    > here it goes
    >
    > for (int i = 0; i < 15; i++)
    > {
    > if( (i%2) == 0)
    > CheckBoxList1.Items.Add(@"<input type='text'
    > value='yahoo' onClick=""return false;""></input>");
    > else
    > CheckBoxList1.Items.Add(i.ToString());
    > }
    >
    >
    > Thanks
    > Masudur
    >
    >
    >
    =?Utf-8?B?RGF2aWQgQW50b24=?=, May 22, 2007
    #4
  5. dancer

    dancer Guest

    Thank you. Now, could you explain to me exactly what it does?



    "David Anton" <> wrote in message
    news:...
    > (via Instant VB)
    > For i As Integer = 0 To 14
    > If (i Mod 2) = 0 Then
    > CheckBoxList1.Items.Add("<input type='text'" & ControlChars.CrLf &
    > "value='yahoo' onClick=""return false;""></input>")
    > Else
    > CheckBoxList1.Items.Add(i.ToString())
    > End If
    > Next i
    >
    > --
    > David Anton
    > www.tangiblesoftwaresolutions.com
    > Instant C#: VB to C# converter
    > Instant VB: C# to VB converter
    > C++ to C# Converter: converts C++ to C#
    > Instant C++: converts C# or VB to C++/CLI
    >
    >
    > "dancer" wrote:
    >
    >> Who can translate this code into VB.net?
    >>
    >>
    >> On May 19, 4:48 am, "dancer" <> wrote:
    >> > Using VB2005 and Asp.net
    >> >
    >> > I have a CheckBoxList. One of the items needs to be user-defined. Is
    >> > it
    >> > possible to put a text box WITHIN a CheckBoxlist?
    >> >
    >> > Meaning - if the user checks "Other" he would also type his definition
    >> > of
    >> > other.

    >>
    >> Hi....
    >>
    >>
    >> here it goes
    >>
    >> for (int i = 0; i < 15; i++)
    >> {
    >> if( (i%2) == 0)
    >> CheckBoxList1.Items.Add(@"<input type='text'
    >> value='yahoo' onClick=""return false;""></input>");
    >> else
    >> CheckBoxList1.Items.Add(i.ToString());
    >> }
    >>
    >>
    >> Thanks
    >> Masudur
    >>
    >>
    >>
    dancer, May 22, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aaron
    Replies:
    0
    Views:
    457
    Aaron
    Jan 1, 2006
  2. Omar Abid

    VB2005 EXPRESS

    Omar Abid, Sep 2, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    372
    Ken Cox [Microsoft MVP]
    Sep 3, 2006
  3. JulioNobre
    Replies:
    0
    Views:
    6,902
    JulioNobre
    Sep 26, 2006
  4. Larry Rebich
    Replies:
    1
    Views:
    368
    Mark Rae
    Nov 18, 2006
  5. Joseph  Gruber

    VB2005 - Untrusted Location

    Joseph Gruber, Mar 17, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    351
    Tom Dacon
    Mar 17, 2007
Loading...

Share This Page