hi
i have some textboxes in my form wat i want to
do is wheever the user clicks the button
the data in text boxes must be stored in database
i have written my insert query like this
<script="vbscript">
<--
sub procedure cmd1_onclick()
<%
set con=server.create.....
con.open "....."
conn.execute "Insert into............"
%>
end sub
-->
</script>
the problem is whenever the page is loaded the insert query is executed
so a blank record is inserted in database and then when button is clicked again
the data is inserted
the problem is its executin the asp code in deleminators first on loadin a form
but i want that to be executed only when click event is fired for button
i only know vbscript
plz help me out
i have temporarily solved this by placin a submit button
and in its action called a form where data from textbox is requested
and then stored in database through query there and again redirecting to
first form
this is increasing my forms nd indeed is a wrong way
so plz help me out