CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Location
    Kathmandu, Nepal
    Posts
    84

    Key Value Pair... in C# Combo Box

    HI
    I AM A BEGINEER TO C# LANGUAGE.

    How can I add items to a combobox in value key format?

    I was able to add the value only using
    ddCombo.Items.Add("HelloWorld");


    Can anyone help me?

    Thank You
    Edit/Delete Message

  2. #2
    Join Date
    Jun 1999
    Posts
    153

    Re: Key Value Pair... in C# Combo Box

    Look up ListItem. It has a key and value.

    ddCombo.Items.Add(new ListItem("HelloWorld", 1));
    Kevin

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured