here is the webform1.aspx :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
<!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 id="Head1" runat="server">
<title>The Test Web Server</title>
</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>
here is webform1.aspx.cs :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication3
{
public partial class WebForm1 : System.Web.UI.Page
{
protected Label time;
protected void Page_Load(object sender, EventArgs e)
{
time.Text = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" +
DateTime.Now.Second.ToString();
}
}
}
you dont have to worry about this seperation since visual studio does it for you automatically.
serkan sendur
Postaholic
Banned
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127