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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...How to write to current page from APIHow to write to current page from API
Previous
 
Next
New Post
3/1/2012 1:18 AM
 

Hi,

I am creating some custom code for a payment processor and need to do a response.write("javascript-here") to the current page for the user in order to make appear a popup for the user to enter some credentials directly with his bank.

However, response.write does not work since the code is in a dll and not for an aspx page.

How do we get to output something to the current page using the dotnetnuke core api?

 
New Post
3/1/2012 2:41 AM
 

There are definitely other ways to do this, but you can find a quick example in my DNNSimpleArticle module's ArticleView control (and code behind)

Basically I inject a literal control into a placeholder control. you could do the same, putting the code you want on the page in that literal

http://dnnsimplearticle.codeplex.com/...

plArticleTitle.Controls.Add(new LiteralControl(curArticle.Title));
plArticleBody.Controls.Add(new LiteralControl(Server.HtmlDecode(curArticle.Body)));


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
3/1/2012 2:12 PM
 
Thanks Chris,

But my code is not in a codebehind, it is a provider, so I get no direct access to the page controls. What I would need is a way to get the page where the user is currently from the api. Maybe it is impossible also..
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...How to write to current page from APIHow to write to current page from API


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