Using an event handler to trigger a CGI?

D

darrel

We're using a 3rd party CGI based search engine for our site.

The sample code to implement a search field is more ASP/PHP centric and uses
the traditional GET form handling:

<form method="get" action="search.cgi">

Since this will be placed within ASPX pages, I obviously already have a FORM
wrapping the page and that form, of course, does a post back.

Is there a way in .net to use the event handler of a button to pass the data
via a get action to the CGI script?

In otherwords, how to I take the traditional method of having multiple forms
on a page all with different ACTION attributes and convert them to the .net
way of having individual event handlers take care of things upon postback?

-Darrel
 
K

KJ

Actually, I don't think you even need to use the form tag to Get your
CGI. Just store the values that normally would have built the
querystring (the input tag values) in server-side variables that are
populated and then updated on postback.

Then, the last thing you do on the button click event (or whatever
event) is response.redirect to the cgi page, passing the stored values
as a querystring which you build and append to the end of the cgi url.
Does that make sense?
 
D

darrel

Actually, I don't think you even need to use the form tag to Get your
CGI. Just store the values that normally would have built the
querystring (the input tag values) in server-side variables that are
populated and then updated on postback.

Then, the last thing you do on the button click event (or whatever
event) is response.redirect to the cgi page, passing the stored values
as a querystring which you build and append to the end of the cgi url.
Does that make sense?

KJ:

Just got back to working on this. Yes, your explanation makes perfect sense!
thanks!

-Darrel
 

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

Top