Re: Issues w/Master Pages?
Hello,
Can you show the code that you are using?
Bottom line is, you simply call the Content Page. :)
Let's say you have Default.aspx, Login.aspx and Register.aspx. Each of these content pages references the Master Page (which you never actually call) and in doing that, each of them will show the Menu with is contained within the Master Pages markup.
From there, you Menu items simply need to do a Response.Redirect to Default.aspx, Login.aspx and Register.aspx.
Or, better still, don't do that code yourself. Create a web.sitemap file, and add a SiteMapDataSource to your page, and point the Menu Control at the SiteMapDataSource and it will handle it all for you.
Gary
Re: Issues w/Master Pages?
Gary,
Here is the code that is in my MP. This is what controls calling my CP's.
Code:
Private Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
Try
Select Case e.Item.Value
Case "mnuCustomerMaintenance"
Response.Redirect("~/Customer/Customer.aspx")
Case "mnuViewCustomers"
Session("disableButtons") = True
Response.Redirect("~/Customer/Customer.aspx")
Case "mnuLookupTable"
Response.Redirect("~/Admin/LookUp.aspx")
Case "mnuEmployees"
Response.Redirect("~/Employee/Employee.aspx")
Case "mnuSystemSettings"
Case "mnuPrinterSetup"
Case "mnuPrint"
Case "mnuCustomerMaintenance"
Case "mnuViewCustomers"
Case "mnuInventoryMaintenance"
Response.Redirect("~/Inventory/Inventory.aspx")
Case "mnuViewInventory"
Response.Redirect("~/Inventory/Inventory.aspx")
Case "mnuReceiveInventory"
Case "mnuAdjustLevels"
Case "mnuVendorMaintenance"
Response.Redirect("~/Vendors/Vendors.aspx")
Case "mnuViewVendors"
Response.Redirect("~/Vendors/Vendors.aspx")
Case "mnuInvoiceMaintenance"
Response.Redirect("~/Invoicing/InvoiceMaintenance.aspx")
Case "mnuViewInvoices"
Case "mnuChangePassword"
Response.Redirect("~/Admin/ResetPassword.aspx")
Case "mnuPrintInvoices"
Case "mnuReportCustomerMasterListing"
Case "mnuInventoryMasterListing"
Case "mnuReportInventoryOutofStock"
Case "mnuReportInventoryPriceList"
Case "mnuReportVendorMasterListing"
Case "mnuReportINvoicingHistoryAging"
Case "mnuLogin"
Response.Redirect("~/Admin/SysLogin.aspx")
End Select
Catch ex As Exception
lblMessage.Text = dbIO.DisplayError("Menu1_MenuItemClick()", "SiteMP", ex.Message)
End Try
End Sub
Re: Issues w/Master Pages?
Hey,
Ah, ok, you are wrapped in a Try/Catch.
Try using the second parameter of the Response.Redirect method:
http://msdn.microsoft.com/en-us/library/a8wa7sdt.aspx
Gary
Re: Issues w/Master Pages?
Which line throws that error?