program to
Check enter year is leap year or not.
-----------------------------------------DESIGN-----------------------------------------------------
<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="Default.aspx.vb"Inherits="_Default"%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML
1.0
Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Untitled Page</title>
</head>
<body>
<formid="form1"runat="server">
<divstyle="font-size: 23px; font-style: normal;">
LEAP YEAR OR NOT</div>
<p>
<asp:LabelID="Label1"runat="server"Text="Enter
Year"></asp:Label>
<asp:TextBoxID="TextBox1"runat="server"style="margin-left: 16px"></asp:TextBox>
</p>
<asp:ButtonID="Button1"runat="server"style="margin-left: 30px"Text="OK"
Width="85px"/>
</form>
</body>
</html>
-----------------------------------------code---------------------------------------------------------
PartialClass _Default
Inherits
System.Web.UI.Page
ProtectedSub
Button1_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles
Button1.Click
If
TextBox1.Text Mod 4 = 0 Then
MsgBox("Leap
Year", , "Message")
TextBox1.Text = ""
Else
MsgBox("Not
Leap Year", , "Message")
TextBox1.Text = ""
EndIf
EndSub
EndC-----------------------------------------output----------------------------------------------------
No comments:
Post a Comment