Search code examples
c#.netdotnetnukemodalpopup

Popping up custom module in Dotnetnuke 6 using UrlUtils class's PopUpUrl method


I am new to DNN and working with custom module in DNN, I have created one Module and then a tab in DNN and placed that custom module on the page. So far so good but now I want to popup that module in a modal popup similar to the login module, using DotNetNuke's UrlUtils class's PopUpUrl method, but it doesn't work and whole page is shown as normal page rather than a modal popup. The method I used is as follows:

1). I Created A Hyperlink and put it on my skin
2). on skin load i have written as follow

myLink.NavigateUrl = "http://www.abcd.com";
myLink.Attributes.Add("onclick","return" + UrlUtils.PopUpUrl(myLink.NavigateUrl, this, PortalSettings, true, false));

now on click of this hyperlink the page from "http://www.abcd.com" should be open in popup but it does not work....am i missing something...OR there is another way of doing this...??


Solution

  • Your issue may be that there's no space between return and the pop-up URL in the onclick attribute.