473,796 Members | 2,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpResponse.Fi lter clearing and what is happening behind the scenes

Hello:

I am trying to better understand the HttpResponse.Fi lter property and,
although I think I "get it," I am wondering what is going on behind
the scenes.

I was initially stumped with the thing because all the samples I came
across kept using the property as an argument to the custom filter
Stream's constructor. What I then figured out was that this is the
way that multiple filters can be chained onto the Response stream. For
example:

// C# Code follows

// Add a filter to the stream
SomeCustomStrea mFilter aFilter =
new SomeCustomStrea mFilter( Response.Filter );
Response.Filter = aFilter;

// ...

// Attach another filter to the stream
AnotherCustomFi lter anotherFilter =
new AnotherCustomFi lter( Response.Filter );
Response.Filter = anotherFilter;

// C# Code ends

The only questions I had remaining are:
1. To what is HttpResponse.Fi lter initially set?
2. How do you clear the filter (remove any filters)? Set it to null?

Assuming you set the filter to null, is there something underneath the
covers that tells Response to then just start sending Response.Write
directly to the output stream?

Or perhaps I am just totally not understanding the whole concept. Can
someone enlighten me?

Thanks ...
--
Chris Simmons
Nov 19 '05 #1
1 3630
logically its the HttpResponse's original OutputStream.

-- bruce (sqlwork.com)
"Chris Simmons" <ne************ ***@netchris.co m> wrote in message
news:eq******** ******@tk2msftn gp13.phx.gbl...
| Hello:
|
| I am trying to better understand the HttpResponse.Fi lter property and,
| although I think I "get it," I am wondering what is going on behind
| the scenes.
|
| I was initially stumped with the thing because all the samples I came
| across kept using the property as an argument to the custom filter
| Stream's constructor. What I then figured out was that this is the
| way that multiple filters can be chained onto the Response stream. For
| example:
|
| // C# Code follows
|
| // Add a filter to the stream
| SomeCustomStrea mFilter aFilter =
| new SomeCustomStrea mFilter( Response.Filter );
| Response.Filter = aFilter;
|
| // ...
|
| // Attach another filter to the stream
| AnotherCustomFi lter anotherFilter =
| new AnotherCustomFi lter( Response.Filter );
| Response.Filter = anotherFilter;
|
| // C# Code ends
|
| The only questions I had remaining are:
| 1. To what is HttpResponse.Fi lter initially set?
| 2. How do you clear the filter (remove any filters)? Set it to null?
|
| Assuming you set the filter to null, is there something underneath the
| covers that tells Response to then just start sending Response.Write
| directly to the output stream?
|
| Or perhaps I am just totally not understanding the whole concept. Can
| someone enlighten me?
|
| Thanks ...
| --
| Chris Simmons
Nov 19 '05 #2

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

Similar topics

8
6535
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and there are many examples. BUT, they fail sometimes. The techique is to pass the form's Me.filter as the "where condition" in a Docmd.openreport statement in code behind a "print button" on the form.
2
2849
by: cefrancke | last post by:
I have a form (no underlying record set) that has two separate sub-forms on it. Each sub-form has data from two different tables. Above each sub-form there is one unbound combo box with a SQL record source that returns an ID field and a Text field. Next to each combo box is two buttons, one that 'Applys' the filter of the sub-form to the value in the combo box and one that 'Clears' the form's current filter. When the click event of the...
6
1761
by: Mountain Bikn' Guy | last post by:
When one gets a row from a database (ie, a DataTable), the row contains a typed value in each column. How is this typically implemented behind scenes. I want to build this functionality myself. The reason I want to do this is because I need an in-memory table without any of the overhead of a DataSet or DataTable. Thanks!
43
6902
by: Mountain Bikn' Guy | last post by:
I have a situation where an app writes data of various types (primitives and objects) into a single dimensional array of objects. (This array eventually becomes a row in a data table, but that's another story.) The data is written once and then read many times. Each primitive read requires unboxing. The data reads are critical to overall app performance. In the hopes of improving performance, we have tried to find a way to avoid the...
4
6235
by: Paul | last post by:
I have developed an ASP.NET web page with a VB.net for the code behind. I would like to redirect the output of the web page so I can send it as an Email. Or Redirect the HTTPResponse stream on the server to a file. Any ideas would be appreciated. Thank you Paul
1
1148
by: mplutodh1 | last post by:
This may seem like an odd thing to do, but is there a way to blindly post to a form. By that I mean, sending data (First_Name=John) without actually having the browser go to that page? I am working on an event registration site, all of the basic registration is done in a simple ASP.NET form which saves the data to an Access DB. We need a mailing list for our website and instead of completely reinventing the wheel I am using an ASP script...
38
2330
by: Zytan | last post by:
What is the difference between these two lines? Dim args As Object() = New Object() {strText} Dim args As Object() = {strText} args seems usuable from either, say, like so: Me.Invoke(delegate, args) Zytan
2
1623
by: Josh Naro | last post by:
I am writing a module that requires the entire output from a web app to perform its function. So, basically I need to be able to pull the entire output stream from the Response object. I've tried attaching a custom filter to Response.Filter, but the custom filter receives the stream in separate chunks. I need the entire stream at once in order to convert it to an XmlDocument. Does anyone know of a way to get the entire output stream from a...
12
10977
by: Darrel | last post by:
I'm still having a hell of a time figuring out this whole SQL Express set up. I finally discovered why I couldn't run the aspnet_regsql...my local sql server wasn't running. I turned that on, and now I can see a list of DBs running locally. However, the .mdf file I have in my app_data folder does NOT appear on this list.
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9531
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10187
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10018
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.