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  |  

Vote for DotNetNuke as your choice for winner of this year's PackT Open Source CMS Award
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Response.Write - content appears outside the module
Previous Previous
 
Next Next
New Post 6/10/2008 2: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 4:07 PM
User is offline cathal connolly
2546 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 4:55 PM
User is offline Brandon Haynes
550 posts
everysport.net
8th 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 10: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 12:07 PM
User is offline Joshua Beall
121 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.

 


Overlook Technology
Website Development, DotNetNuke Consulting, Module Development, Portal Management
OverlookTechnology.com
DeutschNetNuke = DotNetNuke in German
DeutschNetNuke provides all DotNetNuke related services in German (and English).
www.DeutschNetNuke.de
The Standard in Senior Housing Information
SNAPforSeniors provides consumers with free online resources to assist them with their search for senior housing
www.snapforseniors.com

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