changing server side variable with button click

D

dspearing

I'm new to asp, and was wondering how I could change the value of a
server variable when the user clicks a button. The asp page displays a
report using server side vbscript, and I have added an 'export' button
that will copy the report to a file. I need this button to change a
boolean so that the page will re-run, writing the report to the file
instead of the screen.
 
R

Ray Costanzo [MVP]

The button click will have to make another request to the server to rerun
the page. Something like:


<button onclick="location.href='thispage.asp?rerun=1';">Click it</button>

<%

If Request.Querystring("rerun") = "1" Then
'''your code
End If

%>

Ray at work
 

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
474,147
Messages
2,570,835
Members
47,382
Latest member
MichaleStr

Latest Threads

Top