Last post Mar 26, 2007 01:18 AM by Benson Yu - MSFT
Mar 19, 2007 02:20 PM|DonBrown199|LINK
In order to support localization in a database, we have added an attribute to our asp:label controls (and many others). It's CNFKey.
This allows us to have code such as:
<TD><asp:label id=lblAgentID CNFKey="lblAgentID" CssClass="Normal" runat="server">Agent</asp:label></TD>
In VS 2003, we simply added our attribute to the appropriate control types in the file "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml\asp.xsd" and we got intellissense, no warning messages about invalid attribute, etc.
All was good.
Now we've moved to VS 2005 and I can't find the equivilent file to update. Any ideas? I looked in the similar path under the VS 2005 base directory and didn't find the file, nor anywhere that looked appropriate. I also looked in "C:\Program Files\Microsoft
Visual Studio 8\Xml\Schemas", and again, nothing looked appropriate. Any ideas on where I can update the xsd?
Any and all ideas greatly appreciated!
visual studio 2005
Mar 19, 2007 04:00 PM|ps2goat|LINK
You could create a user control that inherits from label, and then add in a CNFKey from there. Then you can register your tag under your own prefix in web.config, if you want. It still has everything you use, and it should be guaranteed to work with all
newer versions of the .NET framework that are backward compatible. (no more having to find and edit files with every upgrade.)
Mar 19, 2007 04:14 PM|DonBrown199|LINK
True. But with almost every type of asp control that has text associated with it, it would be a bunch of controls and changing virtually every control on every page of all our web apps to the new usercontrols.
My current best best is to simply ignore the warnings - it doesn't prevent a success compile. But this is a hack, not a solution.
There has to be a xsd or similar file somewhere that Intellesense is driving off. I suppose it could simply use reflection on the objects from the appropriate dll, but that would sadden me as that would imply ps2goat's solution my only real solution. [:(]
Mar 19, 2007 04:15 PM|DonBrown199|LINK
Mar 22, 2007 02:00 PM|lshammel|LINK
I am also looking for the answer to this question as we took a similar approach in VS2003 and are now converting to VS2005.
M. Arkhipov made the following statement in a response to another question in this forum: "Unfortunately, there is no such thing as custom attribute in Web standards. Page with custom attributes won't pass W3C standard validation. VS 2005 is oriented towards
creating standard-compliant page, especially XHTML."
I would like to know if ps2goat's suggested solution is Microsoft's intended approach for the future, or if there are other approaches that might have less impact on the conversion of large existing applications...
visual studio 2005
Mar 26, 2007 01:18 AM|Benson Yu - MSFT|LINK
Looking at the nature of this issue, it would require intensive troubleshooting which would be done quickly and effectively with direct assistance from a Microsoft
Support Engineer through Microsoft Customer Support Services. You can contact Microsoft Product Support directly to discuss additional support options you may have available, by contacting us at 1-(800)936-5800 or by choosing one of the options listed at http://support.microsoft.com/common/international.aspx?rdpath=fh;en-us;cntactms.
If you are a MSDN subscriber, you can also contact our support by using your free support incidents: