0

in order to corporate with external payment system, I need to respond with blank page with one word 'true' at the beginning. I'm using Dotnetnuke 6 and c# .net 4.0 custom module. I must work with data sent by them, and later put just at the beginning of page world 'true'. So I could somehow reset page and return null page with one word or insert it just at the beginning of the page (even before tag ) I cannot redirect to another page, it must be the same one.

Any ideas ? Is it possible to obtain ?

H.Muster
  • 9,297
  • 1
  • 35
  • 46
user1529839
  • 1
  • 1
  • 5
  • one world? care to expand on what that is? – Ryan McDonough Oct 04 '12 at 14:13
  • i don't know too much DNN but this answer maybe can help you: http://stackoverflow.com/questions/6061286/looking-for-a-httphandler-to-modify-pages-on-the-fly-to-point-to-a-cdn – 2GDev Oct 04 '12 at 14:34

2 Answers2

0

If you haven't returned anything yet you can do Response.Clear(), Response.Write() and a Response.End() to end the request so nothing else is returned.

JoshBerke
  • 66,142
  • 25
  • 126
  • 164
  • there's a problem with dotnetnuke that when I'm in custom module and I'm doing like this, there are still other modules and default.aspx page who is returning some data. So Your tip don't work.. – user1529839 Oct 04 '12 at 14:16
  • Sounds like OP wants *just* the word, not markup whatsoever. I'd look very hard for a different way to communicate with this other app -- XML/SOAP of some kind. – Michael Sallmen Oct 04 '12 at 14:18
  • If you clear the response buffer and end the request something is still being written and flushed to the client? I find that hard to believe that there isn't a hook exposed which will let you do this before any thing else is sent down. – JoshBerke Oct 04 '12 at 15:57
0

This sure sounds like a web service to me. I would either use DNN Services Framework. Or if it is really as simple as returning the word true, I would write an .ashx to do the job. The .ashx will not be run with other modules or as part of default.aspx, so you can easily control everything that is rendered in the response.

ScottS
  • 8,455
  • 3
  • 30
  • 50