Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 681

Best way to execute query on click?

$
0
0
so I am trying to figure out this damn project and how it was written :)

poorly done but in either case I have to use it for now. Have some change requests and what is insane is that the SQL query in the classic asp is being generated dynamically on the fly.

So we have page1 with all inputs, then when you press a button, page 2 generates this sql statement and renders the page. I believe it is obtaining the values from Request.Form then from this, it is constructing the SQL query and executing it finally rendering the page.

So, the change request basically is to add some radio buttons, and when pressed, it will use the current query and alter it slightly (or whatever).
what is the best way of approaching this? I have radio buttons displayed.... now what should I do in terms of when they click it, to then post back to itself with some altered info in terms of what they clicked? Basically depending on what they clicked, a different query needs to be executed.

I see the SQL query being stored in Session, but obviously I cannot seem to retrieve that as I always get an empty string when doing a javascript alertbox, but when doing a response.write (when the page is rendering), it spits it out just fine.

URGH! so confusing and hacky!

Viewing all articles
Browse latest Browse all 681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>