afterdark23
09-02-2005, 09:32 AM
I created a table and I have it set to run as a server control. My reason for doing this is to let the user select a page from a combobox. I have 1 column and 3 rows. The first row has the combobox with the page selections loaded. The second row is where I want the page to load. The third row has a label that will display a error message if something goes wrong.
When I run the program, the combo selection takes me to the correct page, BUT, it is not loaded into the table row. The page is loaded as a new page. How do I get the page to be loaded inside the table row?
Here is what I have:
visual basic code:
Private Sub cboselectpage_SelectedIndexChanged
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles cboSelectPage.SelectedIndexChanged
If cboSelectPage.SelectedIndex = 0 Then
tblMain.Rows(1).Page.Response.Redirect("Attendance.aspx")
ElseIf cboSelectPage.SelectedIndex = 1 Then
tblMain.Rows(1).Page.Response.Redirect("Profile_Report.aspx")
ElseIf cboSelectPage.SelectedIndex = 2 Then
tblMain.Rows(1).Page.Response.Redirect("Area_Progress.aspx")
ElseIf cboSelectPage.SelectedIndex = 3 Then
tblMain.Rows(1).Page.Response.Redirect("PYP_Inquiry.aspx")
'Check for proper role. If user has role, add to list in Page_Load
ElseIf cboSelectPage.SelectedIndex = 4 Then
tblMain.Rows(1).Page.Response.Redirect("Enter_PYP.aspx")
ElseIf cboSelectPage.SelectedIndex = 5 Then
tblMain.Rows(1).Page.Response.Redirect("Edit_PYP.aspx")
End If
End Sub
When I run the program, the combo selection takes me to the correct page, BUT, it is not loaded into the table row. The page is loaded as a new page. How do I get the page to be loaded inside the table row?
Here is what I have:
visual basic code:
Private Sub cboselectpage_SelectedIndexChanged
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles cboSelectPage.SelectedIndexChanged
If cboSelectPage.SelectedIndex = 0 Then
tblMain.Rows(1).Page.Response.Redirect("Attendance.aspx")
ElseIf cboSelectPage.SelectedIndex = 1 Then
tblMain.Rows(1).Page.Response.Redirect("Profile_Report.aspx")
ElseIf cboSelectPage.SelectedIndex = 2 Then
tblMain.Rows(1).Page.Response.Redirect("Area_Progress.aspx")
ElseIf cboSelectPage.SelectedIndex = 3 Then
tblMain.Rows(1).Page.Response.Redirect("PYP_Inquiry.aspx")
'Check for proper role. If user has role, add to list in Page_Load
ElseIf cboSelectPage.SelectedIndex = 4 Then
tblMain.Rows(1).Page.Response.Redirect("Enter_PYP.aspx")
ElseIf cboSelectPage.SelectedIndex = 5 Then
tblMain.Rows(1).Page.Response.Redirect("Edit_PYP.aspx")
End If
End Sub