ObjectList help.

Discussion in 'ASP .Net Mobile' started by leezard, Aug 24, 2003.

  1. leezard

    leezard Guest

    I have created 4 SelectionList boxes and a Command button in the first
    mobile page. User will make their selections and hit the Command button, the
    code below are for the Command button.

    Sub submit_Click_1(sender As Object, e As EventArgs)
    RedirectToMobilePage("mtwo.aspx.?Day=" + Day.Selection.Value + "&TimeID=" +
    TimeID.Selection.Value + "&Origin=" + Origin.Selection.Value + "&DestID=" +
    DestID.Selection.Value)
    End sub

    I wish to implement the code below (which is in a normal ASP.NET page),
    where user will first select the SelectionList in the first page, and be
    directed to the second page where the ObjectList is located. I have try in
    many ways to convert the codes below into ObjectList where data are display
    on it which is supported in a wap device, however still can't get it done.
    Anyone here care to help?

    <code>
    Sub Page_Load(sender As Object, e As EventArgs)
    BindGrid
    End Sub
    Sub Page_Change(sender As Object, e As DataGridPageChangedEventArgs)
    dim start as Integer
    start = MyDataGrid.CurrentPageIndex * MyDataGrid.PageSize
    MyDataGrid.CurrentPageIndex = e.NewPageIndex
    BindGrid
    End Sub
    Sub BindGrid()

    Dim myConnection As SqlConnection = New
    SqlConnection("server=localhost;trusted_connection=true;database=PTG")
    dim ds as DataSet = new DataSet()
    dim adapter as SqlDataAdapter = new SqlDataAdapter("Select * from KTMTT
    where Origin='" & Request.QUeryString("Origin") & "' AND DestID='" &
    Request.QUeryString("DestID") & "' AND TimeID='" &
    Request.QUeryString("TimeID") & "' ", myConnection )
    adapter.Fill(ds,"KTMTT")

    MyDataGrid.DataSource=ds.Tables("KTMTT").DefaultView
    MyDataGrid.DataBind()
    End Sub
    Sub PagerButtonClick(sender As Object, e As EventArgs)
    BindGrid
    End Sub
    </code>

    Thanks in advance.
    leezard, Aug 24, 2003
    #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. JJ
    Replies:
    0
    Views:
    361
  2. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    ObjectList Data-Binding to a List<MyClass>

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Aug 17, 2007, in forum: ASP .Net
    Replies:
    6
    Views:
    746
    Steven Cheng[MSFT]
    Sep 5, 2007
  3. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    DataBinding & the ObjectList Control (Mobile)

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Sep 4, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    653
    =?Utf-8?B?QWxleCBNYWdoZW4=?=
    Sep 5, 2007
  4. ASMJ

    Urgent help with ObjectList

    ASMJ, Jun 23, 2006, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    688
  5. ObjectList Urgent Help!

    , Dec 31, 2006, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    703
Loading...

Share This Page