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.0How do you preserve the url when pressing print?How do you preserve the url when pressing print?
Previous
 
Next
New Post
9/21/2006 4:13 AM
 
Hi,

I have a control which accepts a query string e.g.

/BriefID/27

When I click the print button, it disappears.

Is there anyway to tell print to preserve it when the page refreshes.

I know the DNN way is to avoid Session vars wherever possible.

Or to put it another way,

How can I get the print button to preserve the url and just tag the /dnnprintmode/true/ etc... when it refreshes the page?


Regards


Mike
 
New Post
9/22/2006 4:30 AM
 
I have pretty much resigned myself to always turning off the print icon and creating my own print functions. Can't seem to ever get answers.


Mike

 
New Post
10/5/2006 11:34 AM
 
This is actually a pretty important issue.

If you use the url to pass information, it not only gets destroyed when pressing the print button but also if you use the page refresh interval as well.

If the DNN way is to use URL strings instead of session vars, how can you get around this issue?


 
New Post
10/5/2006 2:47 PM
 

I've dealt with this too. I have to open the control in a blank window and check for the PrintReport variable & re-run my queries.

Dim params As String = "&PrintReport=true&Param1=" Param1 & "&Param2=" & Param2

Response.Write("<script>window.open('" & NavigateURL(TabId, "", "mid=" & ModuleId.ToString, params & "&SkinSrc=" & QueryStringEncode("[G]" & Skins.SkinInfo.RootSkin & "/" & glbHostSkinFolder & "/" & "No Skin"), "ContainerSrc=" & QueryStringEncode("[G]" & Skins.SkinInfo.RootContainer & "/" & glbHostSkinFolder & "/" & "No Container"), "dnnprintmode=true") & "','_blank')</script>")

Then in the page load:

Dim print As String = Request.Params("PrintReport")

If print = "true" Then

'Get location & report level from the querystring

Param1= CInt(Request.Params("Param1"))

Param2 = Request.Params("Param2")

BuildReport(Param1,Param2)

 
New Post
10/6/2006 4:03 AM
 
Thanks for the code. I take it you have your own print button then?

Would this work for the page refresh option because it appears you don't have programmatic control over this?

Regards

Mike

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do you preserve the url when pressing print?How do you preserve the url when pressing print?


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