madhav_ghatole
asked on
how to navigate from one control to another in a dotnetnuke module
I am developing a module HK 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 error
as below
Error: New is currently unavailable.
DotNetNuke.Services.Except ions.Modul eLoadExcep tion: Unable to cast object of type 'ASP.desktopmodules_hk_new 1_ascx' to type 'DotNetNuke.Entities.Modul es.PortalM oduleBase' . ---> System.InvalidCastExceptio n: Unable to cast object of type 'ASP.desktopmodules_hk_new 1_ascx' to type 'DotNetNuke.Entities.Modul es.PortalM oduleBase' . at DotNetNuke.UI.Skins.Skin.I njectModul e(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---
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 error
as below
Error: New is currently unavailable.
DotNetNuke.Services.Except
Thank You.
Protected Sub cmdL1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdL1.Click
Dim objModules As ModuleController = New ModuleController
Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID, "New1", "mid=" & CStr(ModuleId)))
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
aww I was expecting an 'A' however, note that you have a error on the page, which says one or more module did not load. Get rid of that error and you should be fine.
ASKER
and tried
Response.Redirect(Globals.
But it gives error as below, how can I solve this?
Screen.jpg