by Kashif Nisar (4 Submissions)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Wed 30th October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Code to cast your vote(by using application object) Poll your vote and enjoy...
---------
<html>
<body>
<form action=hits.asp method=get>
Are you satisfied the Performance Paksitani cricket team ?<p>
<input type="radio" name="info" value="y" checked=true>Yes
<br><input type="radio" name="info" value="n" >No<p><br>
<input type=submit value=submit onClick="jt()">
</body>
</form>
</html>
Asp Code
--------
<%
val1=request.querystring("info")
val2=request.querystring("info")
if val1="y" then
application.lock
application("num")=application("num")+1
application.lock
response.write("Yes i am satisfied got " & application("num") &" votes")
end if
if val2="n" then
application.lock
application("num1")=application("num1")+1
application.lock
response.write("No i am not satisfied got " & application("num1")& " votes")
end if
n=application("num")+application("num1")
response.write("<br>The total vote cast="&n)
response.write("<br>The total percentage of<b> Yes</b> is"&application("num")/n*100&"%")
response.write("<br>The total percentage of<b> No </b>is"&application("num1")/n*100&"%")
%>
This code provide u the informaiton that who manu hits got by yes and no
also provide u the percentage of yes and no.wish u best of luck
For more information and help in asp(just for guideness) plz contact:
[email protected]
itpeak(pvt)ltd lahore
No comments have been posted about Code to cast your vote(by using application object) Poll your vote and enjoy.... Why not be the first to post a comment about Code to cast your vote(by using application object) Poll your vote and enjoy....