Retrieving Datalist items

Discussion in 'ASP .Net' started by =?Utf-8?B?YWxhbg==?=, Jun 30, 2005.

  1. Hi All,
    I have a DataList, how can I retrieve all the items in the datalist?

    eg.

    for (int i=0; i < DataList.Item.Count; i++)
    MyArray = DataList.Item.xxxxx.??

    Thanks a lot!
    =?Utf-8?B?YWxhbg==?=, Jun 30, 2005
    #1
    1. Advertising

  2. Hi,

    Try this

    foreach(DataListItem item in DataList1.Items)

    Prakash.NET


    "alan" wrote:

    > Hi All,
    > I have a DataList, how can I retrieve all the items in the datalist?
    >
    > eg.
    >
    > for (int i=0; i < DataList.Item.Count; i++)
    > MyArray = DataList.Item.xxxxx.??
    >
    > Thanks a lot!
    =?Utf-8?B?UHJha2FzaC5ORVQ=?=, Jun 30, 2005
    #2
    1. Advertising

  3. thanks, i just figured out what i want

    dlist.item.findControl("xxxxxx")
    this can help me to retrieve the content of the item

    "Prakash.NET" wrote:

    > Hi,
    >
    > Try this
    >
    > foreach(DataListItem item in DataList1.Items)
    >
    > Prakash.NET
    >
    >
    > "alan" wrote:
    >
    > > Hi All,
    > > I have a DataList, how can I retrieve all the items in the datalist?
    > >
    > > eg.
    > >
    > > for (int i=0; i < DataList.Item.Count; i++)
    > > MyArray = DataList.Item.xxxxx.??
    > >
    > > Thanks a lot!
    =?Utf-8?B?YWxhbg==?=, Jun 30, 2005
    #3
    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. Nevyn Twyll
    Replies:
    8
    Views:
    1,843
  2. Ken Varn
    Replies:
    0
    Views:
    402
    Ken Varn
    Dec 15, 2005
  3. Replies:
    2
    Views:
    499
    my$.02
    May 30, 2006
  4. Rogue9
    Replies:
    9
    Views:
    331
    Dennis Lee Bieber
    Jul 18, 2003
  5. Anjan Bhowmik
    Replies:
    1
    Views:
    458
    Misbah Arefin
    Feb 14, 2008
Loading...

Share This Page