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.0DNN page is blank after posting to another web pageDNN page is blank after posting to another web page
Previous
 
Next
New Post
8/17/2006 11:33 AM
 

Okay I have a huge reply to this but only because I'm doing a lot of cut and pasting...

You could create a unique .aspx page for your user, then link to that. But I don’t think that is needed and it also could amount to a lot of work. But it is possible. (and I've done similar)

Next thought: Can you just create/open a new window by JavaScript right on the client? The Window pops up from the parent DotNetNuke page. The popup can be populated with any information you want from your server, almost exactly as above. I’ll try to explain myself by example:

For your DNN module

Create a datagrid and populate the columns with all your information. For example:

<asp:templatecolumn visible="False" headertext="CurrentIP">
  <itemtemplate>
    <%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem,"CurrentIP")) %>
  </itemtemplate>
</asp:templatecolumn>

Notice the visible="False". The info is there but not revealed.
One last datagrid column that is visible is a function

<asp:templatecolumn headertext="Title (Description)">
 <itemtemplate>
  <%# CreateMyWindow(DataBinder.Eval(Container.DataItem,"Title"), _
  DataBinder.Eval(Container.DataItem,"ItemID"), _
  GetUserName(DataBinder.Eval(Container.DataItem,"CreatedByUser")), _
  DataBinder.Eval(Container.DataItem,"CurrentIP"), _
  GetItemCount(DataBinder.Eval(Container.DataItem,"ItemID")), _
  GetLastDate(DataBinder.Eval(Container.DataItem,"ItemID")), _
  DataBinder.Eval(Container.DataItem,"CreatedDate"), _
  DataBinder.Eval(Container.DataItem,"ModifiedDate"), _
  DataBinder.Eval(Container.DataItem,"Category"), _
  DataBinder.Eval(Container.DataItem,"Description"), _
  DataBinder.Eval(Container.DataItem,"Code")) %>
 </itemtemplate>
</asp:templatecolumn>

The above info is not revealed, but is in the browser source code.  Would this be bad for you?

Above, see how CreateMyWindow connects your CreateMyWindow function within your .vb codebehind.

#Region "Function for JavaScript"
'function enables datagrid to format itself with its own cell values

Public Function CreateMyWindow (ByVal SMC_Title As String, ByVal SMC_ItemID As String, ByVal SMC_User As String, ByVal SMC_IP As String, ByVal SMC_Count As String, ByVal SMC_LastDate As Date, ByVal SMC_Created As String, ByVal SMC_Modified As String, ByVal SMC_Category As String, ByVal SMC_Description As String, ByVal SMC_Code As String) As String

Dim s As New StringBuilder
Dim sx As New StringBuilder
Dim i As Integer

s.Length = 0
sx.Length = 0
s.Append("<a ")
s.Append("NAME=")
s.Append(Chr(34) & SMC_Title & Chr(34))
s.Append(" ID=")
s.Append(Chr(34) & SMC_Title & Chr(34))
s.Append(" onclick="" Crossinfo ('")
s.Append(SMC_Code & "','")
s.Append(SMC_Title & "','")
s.Append(SMC_ItemID & "','")
s.Append(SMC_User & "','")
s.Append(SMC_IP & "','")
s.Append(GetCountryName(IP_AddressToNumber(SMC_IP)) & "','")
s.Append(SMC_Count & "','")
s.Append(SMC_LastDate & "','")
s.Append(SMC_Created & "','")
s.Append(SMC_Modified & "','")
s.Append(SMC_Category & "','")
sx.Append(SMC_Description)

sx.Replace(Chr(39), "&#146;")
sx.Replace(vbNewLine, "<br>")

SMC_Description = sx.ToString
s.Append(SMC_Description)

s.Append("','yes');return false"" ")
s.Append("title=""Click here to jump away."" href=""http://www.whatever.com"">")

s.Append(SMC_Title)
s.Append("</a>")

Return s.ToString
End Function

#End Region

the function creates the hyperlink which javascript .js file will use to create the new window:

function Crossinfo(pCode,pTitle,pItem,pUser,pIP,pCount,pLastDate,pCreated,pModified,pCategory,pDescription,pScrolling,My_Html)
{
/*
Crossinfo function opens a new browser window and writes
HTML to display your form away from DotNetNuke.
*/

var DescriptWin;
var s1 = '<Div ';
var s2 = 'HEIGHT=\"450px\" WIDTH=\"750px\" ALIGN=\"middle\" STYLE=\"padding: 5px; border: 2px solid #666666\"';
var s3 = pDescription;
var s4 = "</Div>";
var i=0 ;
s2 += '>';
a= "";
s1 += s2 + s3 +s4;

//alert(s1);
// specify window parameters

DescriptWin = window.open("","DescriptWin","onLoad=window.focus(),width=700,height=450,menubar=no,status=no,scrollbars,resizable,screenX=20,screenY=40,left=480,top=40");
DescriptWin.focus();
// write content to window
  DescriptWin.document.writeln('<html BGCOLOR=White LINK=Gray VLINK=Gray style="position: relative; padding-left: 12px; padding-right: 12px; background-image: url(http://localhost/PHDnet/GradientImage.jpg); background-repeat: repeat-y;"><head><title> Powerhouse Data ***** ' + pTitle + ' *****</title>');
  DescriptWin.document.writeln('<style type="text/css" media="all">');

  DescriptWin.document.writeln('table {');
  DescriptWin.document.writeln('border: 0px solid teal;');
  DescriptWin.document.writeln('border-collapse: collapse;');
  DescriptWin.document.writeln('}');
  DescriptWin.document.writeln('td {');
  DescriptWin.document.writeln('border: 0px solid teal;');
  DescriptWin.document.writeln('padding: 2px;');
  DescriptWin.document.writeln('font: 11px verdana;');
  DescriptWin.document.writeln('color: #696969;');
  DescriptWin.document.writeln('}');
  DescriptWin.document.writeln('hr {');
  DescriptWin.document.writeln('color: #993366;');
  DescriptWin.document.writeln('background-color: #993366;');
  DescriptWin.document.writeln('width: 75%;');
  DescriptWin.document.writeln('height: 1px;');
  DescriptWin.document.writeln('margin-left: auto;');
  DescriptWin.document.writeln('margin-right: auto;');
  DescriptWin.document.writeln('}'); 
  DescriptWin.document.writeln('</style>'); 
  DescriptWin.document.writeln('<SCRIPT language="JavaScript" src="/PHDnet/DesktopModules/Powerhouse.Test/Gradient.js"></SCRIPT>');
  DescriptWin.document.writeln('</head>');
  DescriptWin.document.writeln('<BODY LINK=Gray VLINK=Gray style="position: relative; Height: 100%;"> ');

  DescriptWin.document.writeln(My_Html);
 
  DescriptWin.document.writeln('<br><br>');
  DescriptWin.document.writeln('</body>');
  DescriptWin.document.writeln('</html>');
 
  //setTimeout(function(){ DescriptWin.close(); }, 2000);
  DescriptWin.document.close();

// debugging...
//for (propertyName in window.self)
//for (propertyName in navigator)
//DescriptWin.document.writeln(documentElement + "<br>");
//DescriptWin.document.writeln("<br> = "+propertyName);
//DescriptWin.document.writeln("<br>propertyName.Name = "+propertyName.Name);
//var GridID = GetGridID("SMCGrid")
//DescriptWin.document.writeln("<br>propertyName="+GridID);
//DescriptWin.document.close();

}

Remember you will have to reference this .js file
If the code above looks like too much, don’t worry, the only important line is the line in red.

I realize I may be straying away from getting you precise help - just throwing out some ideas to consider.


    - Doug Vogel     

 
New Post
8/19/2006 1:01 PM
 

Thanks for your detailed reply.  That looks interesting, but I am not sure if it will work or not.  The main thing is that I have to be able to safely pass the username and password to another app.  Within DNN that is easy because they are exposed. 

Do you think that I could adapt this code so that it pops up another aspx page and passes the username and password to that page?  Then I could just put my code to crosspost to the other apps in the load event of the other aspx page.

Thanks,

Sheila

 

 
New Post
8/19/2006 4:25 PM
 
I've never had to do exactly what you're describing.  You might try another post - ask about transfer of UserID and password to a new application.

Also take a look here
http://dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/110/threadid/60728/scope/posts/Default.aspx


sounds like they might have had some degree of success.

    - Doug Vogel     

 
New Post
8/20/2006 9:36 AM
 

Doug,

The code in the post that you linked to made me remember that I don't HAVE to retrieve the username and password directly from the page.  So, I put my code that posts the HTML form to the other application in the load event of a regular aspx page in my DNN app.  That allows me to just include a link to this page in my DNN app and everything behaves perfectly.

I will post the complete code in a seperate thread in case anybody else is interested in passing DNN data to another application, especially Outlook Web Access.

Thanks for your help!

Sheila

 

 
New Post
8/20/2006 4:12 PM
 
sheilagraven wrote
I will post the complete code in a seperate thread in case anybody else is interested in passing DNN data to another application, especially Outlook Web Access.


I am sure there are many fellow users interested!

    - Doug Vogel     

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN page is blank after posting to another web pageDNN page is blank after posting to another web page


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