<%@ Page Language="C#" %>
<script runat="server">
class MyValueClass {
public DateTime dtBirthDay = new DateTime(1999,6,27);
public string GetDayOfWeek() {
return(dtBirthDay.DayOfWeek.ToString());
}
}
void Button_Click(Object Sender, EventArgs e) {
MyValueClass objMyValueClass = new MyValueClass();
Response.Write(objMyValueClass.GetDayOfWeek());
}
</script>
<html><body>
<form runat="server">
<asp:button id="btSubmit" Text="Submit" runat=server OnClick="Button_Click"/>
</form>
</body></html>
|