I'm creating a custom control and I want to change the default signature
of the control using the TagPrefixAttribute.

It seems to be working fine, but it does not respect the order of the
attributes I'm defining in the TagPrefix. 


This is the attribute I have defined:
[ToolboxData("<{0}:MyControl HRef='test'
runat='server'></{0}:MyControl>") ]

When the designer inserts it from the toolbox, it looks like this:
<cc1:MyControl id="MyControl1" runat="server"
HRef="test"></cc1:MyControl>

As you can see, it moved the runat=server to the front.  Worse, when I
have multiple attributes defined, it seems to put them in random order.
For example:

Atribute:
[ToolboxData("<{0}:MyControl HRef='#' ImageSrc='' MouseOverImageSrc=''
Alt='' Height='' Width='' runat='server'></{0}: MyControl >") ]

Results in:
<cc1:MyControl id="MyControl1" runat="server" Height="" Width=""
MouseOverImageSrc="" ImageSrc="" HRef="#" Alt=""></cc1:MyControl>

The placement is not exactly random.  They are consistent, but I can't
find an identifiable pattern.  The order is clearly not what I'ver asked
for.  Has anyone found similar results or have a workaround?

Also the framework seems to be ignoring the TagPrefix attribute as well.
I have mine defined as:
[assembly:TagPrefix("MyProject.CustomControls", "mp") ] 

This is compiling fine, but not working.  I still get cc1.  I have it in
my class file between the using statement and the namespace definition,
as shown in the docs.


Thanks for any help you can provide on these issues.

Stuart Cox


-----Original Message-----
From: Rolls, Robert [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, April 18, 2002 7:10 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] How to render HTML in WinForms without
AxWebBrowser?

Exactly what we thought of writing! Now that would Rock!

-----Original Message-----
From: Brad Wilson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 19 April 2002 8:23
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] How to render HTML in WinForms without
AxWebBrowser?


Hofmeister, Holger wrote:

> I need to display some html thats constructed in code.

The Genghis[1] project has this slated as a feature for the future, but
nobody has offered to write it yet. I might. I haven't decided. ;)

Brad

[1] http://www.genghisgroup.com/

--
Read my web log at http://www.quality.nu/dotnetguy/

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


**********************************************************************"
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information or both. "
No confidentiality or privilege is waived or lost by any "
mistransmission.  If you receive this correspondence in error, please
immediately delete it from your system and notify the sender.  You
must not disclose, copy or rely on any part of this correspondence
if you are not the intended recipient.

Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to
be the views of Vodafone.

This email has been checked for viruses.
************************************************************************
**********************

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to