Results 1 to 2 of 2

Thread: Regarding ASP.NET Mobile Web Application

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    1

    Regarding ASP.NET Mobile Web Application

    Hi guys,

    I doing a project using ASP.NET mobile web application using MS Access as my database. problem is that i only have basic knowledge in Visual Basic.NET programming.

    Right now, I'm looking for codes for generating radio buttons and labels(name) depends on the number of student in my MS Access table.

    here the example: if there is 6 student in the table, it will generate 6 label and radio buttons.



    Later, The attendence field in MS access will be updated increament the value by 1 depend on the radio button that has been clicked.

    Is there anyone out there able to help me out? or codes i can refer to? thanks in advance.

  2. #2
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Regarding ASP.NET Mobile Web Application

    you will need to create the control dynamically....

    add a datatable to the page if it exists in asp.net mobile

    Dim tableHeading As TableRow = New TableRow
    'Create and add the cells that contain the Student ID column heading text.
    Dim selectHeading As TableHeaderCell = New TableHeaderCell
    selectHeading.Text = "Select"
    selectHeading.HorizontalAlign = HorizontalAlign.Left
    tableHeading.Cells.Add(selectHeading)

    Dim l_nameHeading As TableHeaderCell = New TableHeaderCell
    l_nameHeading.Text = "Student Name"
    l_nameHeading.HorizontalAlign = HorizontalAlign.Left
    tableHeading.Cells.Add(l_nameHeading)

    tblStuds.Rows.Add(tableHeading)

    Now what you need to do is get all the students data using a datareader, dataset or array of objects and increment through it and use the following

    Dim detailsRow As TableRow = New TableRow

    Dim l_cellSelect As New TableCell
    Dim l_selector As New RadioButton
    l_selector.ID = l_student.StudentID
    l_cellSelect.Controls.Add(l_selector)
    detailsRow.Cells.Add(l_cellSelect)

    Dim l_nameCell As TableCell = New TableCell
    l_nameCell.Text = l_student.StudentName
    detailsRow.Cells.Add(l_nameCell)

    tblOrders.Rows.Add(detailsRow)
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

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