Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0popup with resx filepopup with resx file
Previous
 
Next
New Post
5/25/2007 12:30 PM
 
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);    

Gerhard Du Toit = Visible Online Solutions
 
New Post
5/28/2007 3:54 PM
 

That sounds interesting...

But I already know how to do a popup, the only thing I want to know is how I can attach a resx file to my popup.

How about the LoadControlType() function?

 
New Post
5/29/2007 6:30 AM
 

Could you tell me if this solution would give access to the resource files?
Could you please post LoadControlType() or do I not need it?

 
New Post
5/29/2007 11:11 AM
 

Hi trouble

Sorry thought it was there, here is LoadControlType():

 

Private Sub LoadControlType()Try

 

If Not _control = "" Then

 

objModule =

 

Dim objModule As System.Web.UI.ControlMe.Page.LoadControl(_control)If Not objModule Is Nothing Then

objModule.ID = _Name

plhControl.Controls.Add(objModule)

 

End If

 

End If

 

ProcessModuleLoadException(

 

Catch ex As ExceptionMe, ex)End Try

 

End Sub

------ 

I still not sure if this will help you just to load the resx file, however the standard function me.page.loadcontrol might help you.

 

 

 


Gerhard Du Toit = Visible Online Solutions
 
New Post
5/30/2007 4:04 AM
 

Well, I had to re-arrange a bit of your code, but you have just solved something great...

With this method you can use dnn labelcontrols in pop-ups.

So THANKS THANKS THANK THANKS....(allot)

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0popup with resx filepopup with resx file


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out