VOTES CAST OR COUNTING
DEFAULT.ASPX.VB
DEFAULT.ASPX.VB
Partial Class _Default
Inherits
System.Web.UI.Page
Public RD As String
Protected Sub Button1_Click(ByVal
sender As Object,
ByVal e As
System.EventArgs) Handles Button1.Click
RD = Request.Form("RB")
If RD =
"RB1" Then
Application("A") = Application("A")
+ 1
ElseIf
RD = "RB2" Then
Application("B") = Application("B")
+ 1
Else
Application("C") = Application("C")
+ 1
End If
End Sub
End Class
DEFAULT.ASPX
<%@ Page Language="VB"
AutoEventWireup="false"
CodeFile="Default.aspx.vb"
Inherits="_Default"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled
Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Can You Score 75 Percent or more marks
in XII Board Exam?<br
/>
<asp:RadioButton ID="RB1" runat="server" GroupName="RB" Text="YES" />
<br />
<asp:RadioButton ID="RB2" runat="server" GroupName="RB" Text="NO" />
<br />
<asp:RadioButton ID="RB3" runat="server" GroupName="RB" Text="CANT SAY" />
<br />
<asp:Button ID="Button1" runat="server" Text="SUBMIT" Width="221px" />
<br />
<br />
<br />
VOTES RESULT IS<br />
<br />
YES <% Response.Write(Application("A"))%><br />
<br />
NO<% Response.Write(Application("B"))%><br />
<br />
CANT SAY<% Response.Write(Application("C"))%>
<br />
</div>
</form>
</body>
</html>
No comments:
Post a Comment