madhav_ghatole
asked on
how do i navigate from one control to another in a module in dotnetnuke
I am developing a module in dotnetnuke.
It has controls as EditModulename.ascx,ViewMo dulename.a scx and New1.ascx.
This module is on home page, when i run this it shows the ViewModulename.ascx control on home page.
Now i have one link button cmdL1, I want to display a New1.ascx control after clicking on cmdL1 button. How can i do this?
I tried as follows but it didn't work. it gives "Property evaluation failed" exception.
Thank You.
It has controls as EditModulename.ascx,ViewMo
This module is on home page, when i run this it shows the ViewModulename.ascx control on home page.
Now i have one link button cmdL1, I want to display a New1.ascx control after clicking on cmdL1 button. How can i do this?
I tried as follows but it didn't work. it gives "Property evaluation failed" exception.
Thank You.
<asp:LinkButton ID="cmdL1" runat="server" Font-Size="X-Small"
OnClick="cmdL1_Click"
CausesValidation = "false"
ForeColor="Red">New Order</asp:LinkButton>
========================================================
Protected Sub cmdL1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdNewOrder.Click
Dim HKTabId As Integer
Dim hkModuleID As Integer
Dim objModules As New ModuleController
Dim HK_Module As ModuleInfo = objModules.GetModuleByDefinition(PortalSettings.PortalId, "HK")
If HK_Module Is Nothing Then
Exit Sub
Else
HKTabId = HK_Module.TabID
hkModuleID = HK_Module.ModuleID
End If
Try
'Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID) & "mid=" & hkModuleID")
Dim ReturnUrl As String = HttpContext.Current.Request.RawUrl
If ReturnUrl.IndexOf("?returnurl=") <> -1 Then
ReturnUrl = ReturnUrl.Substring(0, ReturnUrl.IndexOf("?returnurl="))
End If
ReturnUrl = HttpUtility.UrlEncode(ReturnUrl)
If HKTabId <> -1 And Request.QueryString("override") Is Nothing Then
' user defined tab
Response.Redirect(NavigateURL(HKTabId, "returnurl=" & ReturnUrl), True)
Else
' portal tab
If HKTabId <> -1 Then
Response.Redirect(NavigateURL(HKTabId, "New1", "mid=" & hkModuleID, "returnurl=" & ReturnUrl), True)
Else
Response.Redirect(NavigateURL(HKTabId, "New1", "mid=" & hkModuleID, "returnurl=" & ReturnUrl), True)
End If
End If
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.