Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Response.Write - content appears outside the module
Previous Previous
 
Next Next
New Post 6/10/2008 3:12 PM
User is offline Kau
26 posts
10th Ranked


Response.Write - content appears outside the module 

Hello,

I am working with VS 2005 and C#. I am using the commands

Response.ContentType = "text/html";
Response.Write(HtmlTags);

But the output of this Response.Write appears outside my module, how can I solve it?

Thanks in advance,

Kau.

 
New Post 6/10/2008 5:07 PM
User is offline cathal connolly
2756 posts
www.cathal.co.uk
5th Ranked










Re: Response.Write - content appears outside the module 

I recommend you add a placeholder or label control and write your content to one of them - if you just push content to the response stream it appears at the point of execution, you don't have sufficent control of it's placement.

Cathal

 
New Post 6/10/2008 5:55 PM
User is offline Brandon Haynes
701 posts
brandonhaynes.org
7th Ranked


Re: Response.Write - content appears outside the module 

Hi Kau,

You are almost certainly executing the Write method before any controls have had a chance to render themselves (in the Render phase of the page lifecycle).  This would be expected if the statement were executed in the PreInit, Init, Load, or PreRender methods.  You can read more about the ASP.NET page lifecycle here: http://msdn.microsoft.com/en-us/library/ms178472.aspx.

You could implement a custom rendering behavior in your control to get the string in the place you're looking for, but this may or may not be the best way to accomplish the task.  It's probably not -- you'll almost certainly want to use a placeholder as Cathal suggested.

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post 6/11/2008 11:24 AM
User is offline Kau
26 posts
10th Ranked


Re: Response.Write - content appears outside the module 
Modified By Kau  on 6/11/2008 1:29:12 PM)

Hello,

Thank you for answer, but it doesn't works out fine. I have a html code more or less like this:

 

test = "<form ACTION='cgi-bin/formmail.pl' METHOD='POST'>" +"<INPUT TYPE='HIDDEN' NAME='Name' VALUE='name' SIZE='25' MAXLENGTH='50'>" +"<INPUT TYPE='HIDDEN' NAME='Email' VALUE='email' SIZE='25' MAXLENGTH='50'>" +"<INPUT TYPE='SUBMIT' NAME='name' VALUE='label'>'";

The button appears but, after I pressed it the post never ends. Could you help?

Thanks in advance,

Kau.

string

 
New Post 6/11/2008 1:07 PM
User is offline Joshua Beall
134 posts
9th Ranked


Re: Response.Write - content appears outside the module 

First off, Response.Write is practically nothing more than a debugging tool with ASP.NET.  You almost never want to write directly to the response stream; you want to inject your content into controls that are placed throughout the page.

What do you mean when you say "the post never ends"?  Does the request time out?  Do you get an error?

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Response.Write - content appears outside the module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com
ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP