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.
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.