Hi
To get resource files working is bit more tricky: remember the resource files is predominately used as labels api calls.
However got my popup to work as follow:
1. Create and popup.aspx as below
2. Create a control page with the resource files as you would normally in dnn.
3. Load the control into the popup apsx page.
4. Simply direct to popup.aspx with added quarry string attached from the button you want to call.
5. Ensure you have java script referenced in call page.
Hope the following will help you "Trouble2"
Code for Popup.aspx:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Popup.aspx.vb" Inherits="YourDnnModule.UserControls.PopupPage" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Common.Controls" Assembly="DotNetNuke" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<title>Popup</title>
<base target="_self" />
<link rel="stylesheet" type="text/css" href="~/Portals/0/portal.css" />
<script language="javascript" type="text/javascript" src='<%= ResolveUrl("~/js/dnn.js") %>'></script>
<script language="javascript" type="text/javascript" src='<%= ResolveUrl("~/js/dnncore.js") %>'></script>
</head>
<body>
<form id="Form1" runat="server">
<div>
<asp:PlaceHolder ID="plhControl" runat="server"></asp:PlaceHolder>
</div>
<asp:HiddenField ID="ScrollTop" runat="server" />
</form>
</body>
</html>
Code behind for Popup.aspx.vb:
Imports DotNetNuke
Namespace YourDnnModule.UserControls
Partial Class PopupPage
Inherits System.Web.UI.Page
Private _control As String
Private _Name As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not (Request.QueryString("pop") Is Nothing) Then
_control = Request.QueryString("pop")
Select Case _control.ToLower
Case "control"
_control = "~/DesktopModules/……/Controls/…../Control.ascx"
_Name = "Control"
End Select
End If
LoadControlType()
Me.Page.Title = "Lookup " + _Name
Me.Page.Dispose()
End Sub
Add the following in page load event
Button1.OnClientClick = ItemLookup()
Add funtion for itemlookup:
Protected Function ItemLookup() As String
Dim url As String = ""
Dim features As String = ""
Dim strReturn As String = ""
url = Page.ResolveUrl("~/DesktopModules/..../..../Popup/Popup.aspx?pop=Control")
features = "dialogHeight:500px;dialogWidth:700px;resizable:yes;center:yes;status:no;help:no;scroll:yes;"
strReturn = " OpenPopup(this, '" + url + "', '" + features + "')"
Return strReturn
End Function
Have the following java script refered to in asp page:
function OpenPopup(targetControl, url, features)
{
var args = new PopupArguments();
var returnValue = showModalDialog(url, args, features);
}