Code to cast your vote(by using application object) Poll your vote and enjoy...
Code to cast your vote(by using application object) Poll your vote and enjoy...
Rate Code to cast your vote(by using application object) Poll your vote and enjoy...
(3(3 Vote))
---------
<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
Code to cast your vote(by using application object) Poll your vote and enjoy... Comments
No comments yet — be the first to post one!
Post a Comment