Hello, I am quite new in ASP.NET, I am currently studying C# (still am at the beginning), and I got this task to separate the "code for the presentation part", so I would get two separate files - Test.aspx and Test.aspx.cs. i know that the .cs is actually the C# file, but I have no idea which how to do the separation. So can you please help me, guide me through or something, should I write a form or anything... Here is my (short and simple) code.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="WebApplication1._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>The Test Web Server</title>
<script language = "C#" runat ="server">
void Page_Load(object sender, EventArgs e)
{
time.Text = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" +
DateTime.Now.Second.ToString();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Welcome</h1>
Current time in Skopje:
<asp:Label ID ="time" runat ="server" Text =""></asp:Label>
</div>
</form>
</body>
</html>