Forums
This topic is locked
How to Redirect on Button Click?
Posted 19 Nov 2005 14:45:11
1
has voted
19 Nov 2005 14:45:11 chintan sal posted:
How to redirect a user to a ASP page on click of a button.In detail:- I have one html page in which one button is their, I want to redirect user to my 'rptview.asp' page on that buton click which will display the result frm database. any body can hlp plz....
Replies
Replied 24 Nov 2005 17:39:47
24 Nov 2005 17:39:47 andy bertaut replied:
There are a number of different ways, depending on what you want to achieve....can you provide a little more detail?
Replied 26 Nov 2005 14:20:42
26 Nov 2005 14:20:42 chintan sal replied:
What exactly I want to do is I want to prepare a form which accepts user's name & tel. no. and on click of submit button it should be stored in a database, for this I have made one asp page "insert.asp". Now their is another button to view,on click of it I want to display the record which are stored in the database for that I have made "view.asp" page.The problem is how is it possible to have 2 different form "action" & "method" for the above 2 events on the same form..
----------------------------------------------------------------------------------------------
Also I want to know whthere CSS can be apply o ASP page i.e when I click on view button it will show me the result in table with alternate row color one with white row & other with purple row.Is it possible to write a style sheet so that I can use it for my other reports also, plz reply for this I need it
----------------------------------------------------------------------------------------------
Also I want to know whthere CSS can be apply o ASP page i.e when I click on view button it will show me the result in table with alternate row color one with white row & other with purple row.Is it possible to write a style sheet so that I can use it for my other reports also, plz reply for this I need it
Replied 02 Dec 2005 11:15:30
02 Dec 2005 11:15:30 richard fuller replied:
if you have two buttons on your form, one can be a submit button , while the other is just a button. When the first is pressed the data is submitted and stored, but when the second is clicked you can redirect them using javascript like this
<input type="button" name="viewdate" value="show me results" onclick="javascript:document.location.href='myresultspage.asp?id=<%=myRecordID'">
then you can use the querystring id on myresultspage.asp to select the record to display.
Regards
Richard
<input type="button" name="viewdate" value="show me results" onclick="javascript:document.location.href='myresultspage.asp?id=<%=myRecordID'">
then you can use the querystring id on myresultspage.asp to select the record to display.
Regards
Richard