473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Attribute 'OnLoadComplete' is not a valid attribute of element 'Pa

So this one is confusing as everything works but I want this warning to go
away. This is what I have (within a .NET 2.0 Web Application, using VS.NET
2008 SP1):

default.aspx:

<%@ Page Language="C#" OnLoadComplete="Page_LoadComplete" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<script runat="server">
protected void Page_LoadComplete(object sender, EventArgs e)
{
// anything here..
}
</script>

...any ideas?

Thank you!
Michael

--
msdn premium subscriber
Aug 20 '08 #1
5 2893

"mpaine" <mp****@community.nospamwrote in message
news:0B**********************************@microsof t.com...
So this one is confusing as everything works but I want this warning to go
away. This is what I have (within a .NET 2.0 Web Application, using
VS.NET
2008 SP1):

default.aspx:

<%@ Page Language="C#" OnLoadComplete="Page_LoadComplete" %>
Where did you get the idea for the above attribute??

This is sufficient:-

<%@ Page Language="C#" %>

<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
It would be strange config if the above two namespaces were not already
present in the config, drop these imports.

<script runat="server">
protected void Page_LoadComplete(object sender, EventArgs e)
{
// anything here..
}
</script>


--
Anthony Jones - MVP ASP/ASP.NET
Aug 20 '08 #2
Thanks for Anthony's inputs.

Yes, the "OnLoadComplete" attribute should not exists in @Page directive.
Generally a typical page event registering is like below(if you use inline
server code):

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

<!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>
<script runat="server" language="C#">
protected void Page_LoadComplete(object sender, EventArgs e)
{
Response.Write("<br/>Page_LoadComplete");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>

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

=========================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Anthony Jones" <An*@yadayadayada.com>
References: <0B**********************************@microsoft.co m>
Subject: Re: Attribute 'OnLoadComplete' is not a valid attribute of
element 'Pa
>Date: Wed, 20 Aug 2008 23:09:25 +0100
>

"mpaine" <mp****@community.nospamwrote in message
news:0B**********************************@microso ft.com...
>So this one is confusing as everything works but I want this warning to
go
>away. This is what I have (within a .NET 2.0 Web Application, using
VS.NET
>2008 SP1):

default.aspx:

<%@ Page Language="C#" OnLoadComplete="Page_LoadComplete" %>

Where did you get the idea for the above attribute??

This is sufficient:-

<%@ Page Language="C#" %>

><%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>

It would be strange config if the above two namespaces were not already
present in the config, drop these imports.

><script runat="server">
protected void Page_LoadComplete(object sender, EventArgs e)
{
// anything here..
}
</script>

--
Anthony Jones - MVP ASP/ASP.NET
Aug 21 '08 #3
Hi Michael,

Have you got any progress on this issue or does the suggestion in previous
messages help you some?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: st*****@online.microsoft.com (Steven Cheng [MSFT])
Organization: Microsoft
Date: Thu, 21 Aug 2008 02:41:46 GMT
Subject: Re: Attribute 'OnLoadComplete' is not a valid attribute of
element 'Pa
>
Thanks for Anthony's inputs.

Yes, the "OnLoadComplete" attribute should not exists in @Page directive.
Generally a typical page event registering is like below(if you use inline
server code):

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

<!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>
<script runat="server" language="C#">
protected void Page_LoadComplete(object sender, EventArgs e)
{
Response.Write("<br/>Page_LoadComplete");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>

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

=========================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to
Aug 25 '08 #4
it did, thanks for the help.

--
msdn premium subscriber
"Steven Cheng [MSFT]" wrote:
Hi Michael,

Have you got any progress on this issue or does the suggestion in previous
messages help you some?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: st*****@online.microsoft.com (Steven Cheng [MSFT])
Organization: Microsoft
Date: Thu, 21 Aug 2008 02:41:46 GMT
Subject: Re: Attribute 'OnLoadComplete' is not a valid attribute of
element 'Pa

Thanks for Anthony's inputs.

Yes, the "OnLoadComplete" attribute should not exists in @Page directive.
Generally a typical page event registering is like below(if you use inline
server code):

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

<!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>
<script runat="server" language="C#">
protected void Page_LoadComplete(object sender, EventArgs e)
{
Response.Write("<br/>Page_LoadComplete");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>

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

=========================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to

Aug 25 '08 #5
Thanks for your followup Michael,

If you have any further questions on this later, please feel free to post
here.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
--------------------
>From: =?Utf-8?B?bXBhaW5l?= <mp****@community.nospam>
References: <0B**********************************@microsoft.co m>
<Ox**************@TK2MSFTNGP06.phx.gbl>
<xi**************@TK2MSFTNGHUB02.phx.gbl>
<U#**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Attribute 'OnLoadComplete' is not a valid attribute of element
Date: Mon, 25 Aug 2008 11:08:06 -0700
>
it did, thanks for the help.

--
msdn premium subscriber
"Steven Cheng [MSFT]" wrote:
>Hi Michael,

Have you got any progress on this issue or does the suggestion in
previous
>messages help you some?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
>================================================= =
This posting is provided "AS IS" with no warranties, and confers no
rights.
>>
--------------------
>From: st*****@online.microsoft.com (Steven Cheng [MSFT])
Organization: Microsoft
Date: Thu, 21 Aug 2008 02:41:46 GMT
Subject: Re: Attribute 'OnLoadComplete' is not a valid attribute of
element 'Pa
>
Thanks for Anthony's inputs.

Yes, the "OnLoadComplete" attribute should not exists in @Page
directive.
>Generally a typical page event registering is like below(if you use
inline
>server code):

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

<!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>
<script runat="server" language="C#">
protected void Page_LoadComplete(object sender, EventArgs e)
{
Response.Write("<br/>Page_LoadComplete");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>

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

=========================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to

Aug 26 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dietmar Gräbner | last post by:
Hi Right now I'm dealing with derivation by restriction and I have some questions concerning the attribute property use in context of the derivation. Consider following Schema: <xs:schema...
2
by: piraticman | last post by:
Hi. I have some code for a javascript jump menu... It validated with HTML 4.0 but now does not validate with XHTML strict 1.0. I have used name atributes in my code which aparantly are not...
4
by: Martin Lucas-Smith | last post by:
I am wanting to know whether are XHTML1-valid characters for use within an id attribute and/or a name attribute. ...
12
by: Stefano | last post by:
Hi all, what is the correct use of the "default" attribute in XML Schema? For example: <xs:element name="myProperty" type="xs:string" default="myDefaultValue"/> What can I do with it? What...
3
by: Patrick | last post by:
>Is it actually valid to have an XML document with 2 XML Elements having the same ID attribute? XML Spy seems to allow something like the following <?xml version="1.0" encoding="UTF-8"?>...
6
by: Joe | last post by:
Hello All: Does anyone know the difference between the name and id attributes in an Html control? I noticed on PostBack that I can not retrieve the Request.Form("id_value") but I can retrieve...
3
by: patrizio.trinchini | last post by:
Hi, how can remove sibling elements based on the value of an attribute ? For instance, gven the XML document: <root> <parentElment> <testElement name="A"> <removableElement/>
4
by: Mark | last post by:
Hi, I am trying to port an application for ASP.NET 1.1 to ASP.NET 2.0. Why am I getting "Error 1 Validation (Internet Explorer 6): Attribute 'ms_2d_layout' is not a valid attribute of element...
0
by: Aray | last post by:
Let us see the test file following: -------file nowork.xsd begin----------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.