This topic is locked

help with new button

11/3/2008 12:01:04 PM
ASPRunnerPro General questions
S
sleighbor author

Hello,
I am trying to add a button to the list page so that when it is clicked a sql statement is executed. The problem is that the code executes when the page loads instead of waiting until I click the button. Here is my asp snippet:
Response.Write "<INPUT class=button type=button value=""&nbsp;&nbsp;Ignore User&nbsp;&nbsp;"">"
dim rs

set rs = server.createobject("ADODB.Recordset")

rs.open "Update nt1restore SET ignore = '1', ignorereason = 'manual edit' where username = 'schwend'", dbConnection
Any help would be appreciated.
Thank you,

Kevin

Sergey Kornilov admin 11/3/2008

Kevin,
this is how web applications work. You submit the form by clicking the button, page is reloaded and your code is executed.
You need to put this code to BeforeProcess event and execute only when "Ignore User" button is clicked.
I need to see your application to provide more detailed advice. You can post your application to Demo Account and send the URL to support@xlinesoft.com.

S
sleighbor author 11/3/2008

Hi Sergey,
I have uploaded the application to the demo account. Here is the URL:
http://demo.asprunner.net/kevin_ob_usa_net...estore_list.asp
What I am trying to accomplish is ask the user for a name and use that varaible in my sql statement for the username = 'variable'.
Thanks for your help.
Kevin

J
Jane 11/6/2008

Kevin,
please send link to your application to support@xlinesoft.com along with detailed description of what you want ot achieve.