Thread: Inline code
View Single Post
 
Old July 18th, 2010, 06:38 AM
majeedkhan majeedkhan is offline
Authorized User
 
Join Date: Feb 2010
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inline code

Hi Imar,

As i am using visual studio 2008 not the express edition. the inline code doesn't work. here is the code:

<%@Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<script runat ="server" >
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text ="hello; the time is now:"+ DateTime.Now.ToString();
}
</script>
<!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>

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</div>
</form>
</body>
</html>




The program runs but deosn't show any output.

Thanks