How to find control inside of <ItemTemplate> ?

Discussion in 'ASP .Net Mobile' started by slava_th@newtone.dp.ua, Feb 8, 2005.

  1. Guest

    Hi,

    I have this List control on my mobile form.

    <mobile:List id="lstContacts" runat="server">
    <DeviceSpecific Runat="server">
    <Choice>
    <ItemTemplate>
    <mobile:Link ID="lContactName" ..
    <mobile:Command...
    </ItemTemplate>
    </Choice>
    </DeviceSpecific>
    </mobile:List>

    I'd like to customize NavigateUrl,Text of lContactName inside of the
    code of ItemDataBind handler for each data item. (I would not like
    doing it via data binding expression, better in code)
    How to find lContactName for each instance of this template ?

    Also another small question, maybe someone had an experience with it.

    I paginate this list using LoadItems event. I assign
    lstContacts.ItemCount property for the first time - LoadItems handler
    is called and List displays items from the page 1.
    Then at some point I need to display another set of items, I set
    ItemCount to some another number ... but LoadItems event is not called.

    With ObjectList I could overcome this problem by setting ItemCount to 0
    prior to assigning new number of items, but with List class it doesn't
    work. What magic there ?

    Thanks,

    Vlad
     
    , Feb 8, 2005
    #1
    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. Bennett Haselton
    Replies:
    1
    Views:
    5,409
    Joe Fallon
    Sep 24, 2004
  2. Charlie@CBFC
    Replies:
    0
    Views:
    394
    Charlie@CBFC
    May 17, 2006
  3. Charlie@CBFC
    Replies:
    2
    Views:
    559
    Charlie@CBFC
    May 18, 2006
  4. Jim in Arizona

    Finding a control inside an <itemtemplate>

    Jim in Arizona, Jan 4, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    403
    Eliyahu Goldin
    Jan 4, 2007
  5. AlecL
    Replies:
    3
    Views:
    1,283
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 11, 2007
Loading...

Share This Page