ObjectList help.

L

leezard

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top