Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2007, 01:57 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default run a file

Hi am very new to asp.net programming...
just started to learn.....
am unable to run a code... can anybody help me out how to do that???

say am having a file saved as punctual.aspx

the file contains:

<%@ Page Language="C#" %>
<script runat="server">

    void Page_Load()
    {
      time.Text=DateTime.Now.ToString();
    }// Insert page code here
    //

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
       In WebServerLand the time is currently:
<asp:Label id="time" runat="server" />
    </form>
</body>
</html>


now while i open the file using Microsoft Visual Studio 2005 am getting errors:

1)Error 1 Validation (XHTML 1.0 Transitional): Element 'html' is missing required attribute 'xmlns'. D:\practices\wrox codes\Complete_Code\Ch01\punctual.aspx 11 2 Miscellaneous Files

2)Error 2 Validation (XHTML 1.0 Transitional): Element 'title' occurs too few times. D:\practices\wrox codes\Complete_Code\Ch01\punctual.aspx 12 2 Miscellaneous Files

3)Error 3 Validation (XHTML 1.0 Transitional): Element 'form' is missing required attribute 'action'. D:\practices\wrox codes\Complete_Code\Ch01\punctual.aspx 15 6 Miscellaneous Files


can anybody tell me y am gettin this error??? where i am going wrong?????

Thanks,
Ani
 
Old April 18th, 2007, 04:07 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi

To remove the errors, follow the steps below:

1. Replace the opening HTML tag with the following:
<html xmlns="http://www.w3.org/1999/xhtml">

2. After the <head> tag, specify a title for the page, like
<title>Wrox Test</title>

3. Give the form an id as below:
<form id="form1" runat="server">

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.





Similar Threads
Thread Thread Starter Forum Replies Last Post
xp_cmdshell to run VBS file madhusr SQL Language 1 December 1st, 2008 02:09 PM
Getting a C# program with a manifest file to run i Bill_Thompson C# 2005 0 January 21st, 2008 06:27 PM
run file mani_he Pro PHP 0 May 4th, 2005 10:50 AM
Run prg file tsimsha Pro VB 6 0 December 13th, 2004 05:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.