473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Hot to prevent sending an HTML from asp.net

Hi,

How do i prevent my asp application to send back a html to the client ? I
want my asp to send only the http header response without some html trail.
I tried to delete the aspx content but still my browser gets an empty html.
I dont want any html!

How can i do that ?

Thanks
Feb 26 '06 #1
2 1007
Response.close() afaik?
If that doesn't work, you'll need a generic handler instead and simply not
return any data, not a real way to do it though.


"barbutz" <ba*****@discussions.microsoft.com> schreef in bericht
news:A5**********************************@microsof t.com...
Hi,

How do i prevent my asp application to send back a html to the client ? I
want my asp to send only the http header response without some html trail.
I tried to delete the aspx content but still my browser gets an empty
html.
I dont want any html!

How can i do that ?

Thanks

Feb 26 '06 #2
Your browser is unlikely to be only making a head request, so your webserver
will action a get/post and asp.net will respond accordingly by returning a
page rather than just a header.

I am guessing the only place to do this would in the pipeline via an
ihttpmodule. You would have to intercept the processing of the asp.net
response, clear the existing response, write the appropriate header, flush
the buffer and end the response. However, if the browser is making a
get/post - it will expect to get a Response.StatusCode = 200 returned or it
may see the response as flawed.

Regards

John Timney
Microsoft MVP

"barbutz" <ba*****@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
Hi,

How do i prevent my asp application to send back a html to the client ? I
want my asp to send only the http header response without some html trail.
I tried to delete the aspx content but still my browser gets an empty
html.
I dont want any html!

How can i do that ?

Thanks

Feb 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brett | last post by:
I have a client that wants to send HTML based email. Building and sending isn't a problem, but he wants to include a plain text link at the top of the email that will display if the user doesn't...
1
by: Failure | last post by:
I want to embed html in my xml document. What tag must I use to prevent the parser from parsing the html? TIA!
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
2
by: Paul Turley | last post by:
Does anyone have some sample code for sending an HTML formatted message using CDONTS? Thanks RE: Sending HTML formatted mail using CDONTS -- Paul Turley, MCSD, MCAD, MCT, MSF...
4
by: Justin | last post by:
I have a fairly large piece of html, about 50 lines that I would like to send via an ASP.NET page I was wondering what would be the best and cleanest way to do this? Is there a way I can put the...
7
by: Ray Booysen | last post by:
Hi all I'm sending email via ASP.NET in HTML mode. Each email has exactly one attachment and I do have full access to the SMTP server. However, if I send the email in HTML format, the...
1
by: robbiesmith79 | last post by:
Just so this is out there on the web, I battled the past 24 hours about this. Background info... I developed a ecommerce website in PHP 4 on a shared linux hosting plan from GoDaddy and had the...
2
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= | last post by:
I wrote some code to send an email with two alternate views: 1) html 2) plain text All the html enabled email clients accept the html just fine and disregard the plain text version. However,...
2
by: Aneesh Pulukkul[MCSD.Net] | last post by:
Hi, I have a HTML page and associated images. I need to send the HTML as email -the email should also display the images at respective places. So am sending the content of HTML file as...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.