Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > How to suppress Response from within a control?

Reply
Thread Tools

How to suppress Response from within a control?

 
 
Ahmet Gunes
Guest
Posts: n/a
 
      04-13-2008
Hello,

I am developing a custom control.
From within this control, maybe during/before rendering, I want to totally
clear the response content and only render this control's output.
When I use Response.Clear() and/or Response.ClearContent() and/or delete
controls from the Controls collection of the Page I still get the closing
tags of form, body, and html tags in the resulting html.

Any idea?

Thanks in advance,

AhmetG


 
Reply With Quote
 
 
 
 
Peter Bucher [MVP]
Guest
Posts: n/a
 
      05-01-2008
Hello AhmetG

> I am developing a custom control.
> From within this control, maybe during/before rendering, I want to totally
> clear the response content and only render this control's output.
> When I use Response.Clear() and/or Response.ClearContent() and/or delete
> controls from the Controls collection of the Page I still get the closing
> tags of form, body, and html tags in the resulting html.

Thats a standard behavior of ASP.NET.
Whats the reason for your approach?
More details please...

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

 
Reply With Quote
 
 
 
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      05-10-2008
It sounds like you are clearing all of the page processing that happened
before the control is rendered, but not after.
You should be able to solve this problem by making your last line of code
this:
Response.End()

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net


"Ahmet Gunes" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello,
>
> I am developing a custom control.
> From within this control, maybe during/before rendering, I want to totally
> clear the response content and only render this control's output.
> When I use Response.Clear() and/or Response.ClearContent() and/or delete
> controls from the Controls collection of the Page I still get the closing
> tags of form, body, and html tags in the resulting html.
>
> Any idea?
>
> Thanks in advance,
>
> AhmetG
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to suppress/clear Response from within a control? Ahmet Gunes ASP .Net 1 04-14-2008 03:11 PM
How to suppress all Response content from within a control? Ahmet Gunes ASP .Net Web Controls 2 04-14-2008 02:14 PM
ASP.NET suppress response HTML Andy ASP .Net 3 05-31-2007 05:01 PM
How suppress splitting of words within JEditorPane Mich Java 2 02-04-2004 10:36 AM



Advertisments