468,747 Members | 1,769 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,747 developers. It's quick & easy.

Intercepting asp call and talking with Browser and IIS

I am new to asp.net.
I have an asp page with a submit button which sends out some
information.

Instead of having IIS to respond and deal with this information, I
would like to have a .NET program (for instance a .NET service, or even
a client .net application) which is able to intercept this call and
deal with the associate information. This middle application might
decide whether to send something to IIS or just do everything by itself
and respond to the browser..

I would be grateful if you could give indications on how to implement
the key parts of this architecture (intercepting the info associated to
submit or other asp call and the talking back with the browser and in
case sending something to IIS). Pointer to demos or code snippets are
particularly appreciated.

-Pam

Jun 11 '06 #1
3 1305
On 11 Jun 2006 04:19:56 -0700, pa***********@libero.it wrote:
I would be grateful if you could give indications on how to implement
the key parts of this architecture (intercepting the info associated to
submit or other asp call and the talking back with the browser and in
case sending something to IIS). Pointer to demos or code snippets are
particularly appreciated.


Things are not as simple as that. When a button submits data to a site,
the page expects to receive data back, and essentially considers the
existing page to be gone. This means you *HAVE* to send back the original
page if you use a normal submit process and want the same page to stay
there.

There are other options, but they are greatly more complicated. For
example, you can use Ajax, which is essentially javascripted code to submit
a request and then do whatever you like.

Another option is to use ActiveX or Java/.net applets on the client.

You really need to have a better idea of what it is you are trying to
accomplish so that you can choose the right technique. What you've written
so far is very vague.

Start here:

http://atlas.asp.net/Default.aspx?tabid=47
Jun 11 '06 #2
Pamela,
As Erik indicates, your post is somewhat vague. The key thing to understand
here is that when a page in a browser has a form that can be submitted, the
form makes an HTTP post to the forms "ACTION" target URL. That URL is
normally an HTTP Listener like IIS, usually (but not always) to the same page
from which the page in the browser came from.

So the bottom line is that if you expect to be able to "Intercept" this post
in some way, unless the original page in the browser was generated and sent
out by some other infrastructure than IIS, you are pretty much tied into the
framework from whence it came.

You can have ISAPI filters in IIS, and UrlRewriters / HttpHandlers in
ASP.NET that can approach what you are describing, but the bottom line is
that the post has to be over HTTP.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"pa***********@libero.it" wrote:
I am new to asp.net.
I have an asp page with a submit button which sends out some
information.

Instead of having IIS to respond and deal with this information, I
would like to have a .NET program (for instance a .NET service, or even
a client .net application) which is able to intercept this call and
deal with the associate information. This middle application might
decide whether to send something to IIS or just do everything by itself
and respond to the browser..

I would be grateful if you could give indications on how to implement
the key parts of this architecture (intercepting the info associated to
submit or other asp call and the talking back with the browser and in
case sending something to IIS). Pointer to demos or code snippets are
particularly appreciated.

-Pam

Jun 12 '06 #3

Dear Peter and Erik, Thank you for the feedback.

As I indicated I am quite new to the whole thing.
but I know that choosing the right approach is already more
than 50% work done.

I will explain better what I am trying to do.

I have some classes that, put simply - given a connection to a database
and some information on how to build a report layout -
send the request to the database, extract the data using a fast
oledbreader
and build on the fly a report page html.

This is purely static html + CSS.
I would like to make this "dynamic". I am thinking about
2 first levels:

1. Simple possibility refresh of report when the user presses a
button

2. Give the user the possibility to change manually the SQL query
which extracts data
from the database (for instance adding filters, where, having...)
and refresh the report.

Given that I already have the classes (vb.net) to query the DB and to
build on the fly
the report html page, what I would like to know is what is the best way
to trasnsform
the current situation, which is pretty static, in a dynamic one, where
the user
can, through its browser, modify (just filtering changes, not
structural) the query SQL and
cause the regeneration of the report.

Since I have been programming this as a win application, and not with
asp.net, some schematic and simple example on the right approach would
really help a lot.

-pam

Jun 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Valery Polyakov | last post: by
4 posts views Thread by Curious Coder | last post: by
reply views Thread by ddman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.