Intercepting asp call and talking with Browser and IIS

P

pamelafluente

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
 
E

Erik Funkenbusch

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
 
G

Guest

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
 
P

pamelafluente

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top