locked
List problem in Mobile control........ RRS feed

  • Question

  • User1804643598 posted

    Hi All,

    I am using mobile list control inside that i inserted a label when i bind any dataset to that list it is not displaying any information. In msdn it is mentioned the mobile list control is equivalent of web control is datalist. The code as follows.

    <mobile:List Runat="server" ID="List2">
                <Item>
                    <mobile:Label runat="server" id="lblStudentName" Text='<% #Eval("StudentName") %>'>
                    </mobile:Label>
                </Item>
            </mobile:List>

    in code behind

     

    protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

    MTestDataContext dc = new MTestDataContext();

    List2.DataSource = dc.Students;
                List2.DataBind();

    }

    }

     

    It is very urgent requirement to me..........

    Tuesday, April 20, 2010 12:58 AM

All replies

  • User516094431 posted

    Kindly use the 

    <ItemTemplate>

    rather then <Item>.

    Mean to say that use label in <ItemTamplate>.

    Tuesday, April 20, 2010 7:08 AM
  • User1804643598 posted

    Hi,

    ItemTemplate is not exist in the mobile list control. It will allow only items.

    Tuesday, April 20, 2010 7:19 AM