W
wtsnet
I've got a usercontrol created on the fly using XSLT:
<%@ Control Language='vb' AutoEventWireup='false'
Codebehind='DynamicContent.ascx.vb'
Inherits='System.Web.UI.UserControl'
TargetSchema='http://schemas.microsoft.com/intellisense/ie
5' %>
<asp
anel id="Panel_welcome" runat="server"
xmlns:asp="remove">
<asp:Image id="Image_welcome"
ImageUrl="PeopleOnBeach.jpg" runat="server"
class="picture_left">
</asp:Image>
</asp
anel>
The <asp
anel element gives a "The server tag is not
well formed" error. If you remove the xmlns:asp
attribute, it's OK. If you remove the runat="server"
attribute, the usercontrol loads OK (and the asp:Image
appears as an <IMG> correctly), but the <asp
anel just
get's pushed straight through to the client, where the
browser ie6 ignores it.
Q1) Are <asp
anel/> tags in the HTML output likely to
break some browsers?
Q2) Why does VS complain that 'The server tag is not well
formed?'
The whole surrounding problem is of trying to get data
held in XML to get translated to dynamically created web
server controls, but WITHOUT having to Parse and Add each
control in a code loop. (I'm just being bloody minded!)
Thanks!
Andy
<%@ Control Language='vb' AutoEventWireup='false'
Codebehind='DynamicContent.ascx.vb'
Inherits='System.Web.UI.UserControl'
TargetSchema='http://schemas.microsoft.com/intellisense/ie
5' %>
<asp

xmlns:asp="remove">
<asp:Image id="Image_welcome"
ImageUrl="PeopleOnBeach.jpg" runat="server"
class="picture_left">
</asp:Image>
</asp

The <asp

well formed" error. If you remove the xmlns:asp
attribute, it's OK. If you remove the runat="server"
attribute, the usercontrol loads OK (and the asp:Image
appears as an <IMG> correctly), but the <asp

get's pushed straight through to the client, where the
browser ie6 ignores it.
Q1) Are <asp

break some browsers?
Q2) Why does VS complain that 'The server tag is not well
formed?'
The whole surrounding problem is of trying to get data
held in XML to get translated to dynamically created web
server controls, but WITHOUT having to Parse and Add each
control in a code loop. (I'm just being bloody minded!)
Thanks!
Andy