Wednesday, March 28, 2012

Changed control prefix doesnt apply when dragging control from toolbox

Hello,

due to problems with Intellisense not recognizing the new ajax controls such as updatepanel and scriptmanager I tried to give them a different prefix. I thought ajax would be nice instead of asp, so I specified this in my web.config

<add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
However, when I drag 'n drop an Ajax control from the toolbox it will still get the asp prefix. Now I've done some custom control development, so I know you can give a control an attribute called ToolboxData where you can use a placeholder for the actual prefix. So did the Ajax developers not use this, or do I need to do something else to get my new prefix when I select a control from the toolbox?

hello.

well, I'm thinking that they've only used the tagprefixattribute to set the default attribute of the controls...


Yes, but the design surface and intellisense will normally use the prefix that is specified in the web.config. However, I think I may have found a bug. It seems there might be a problem is there's a newline character in the assembly attribute. Maybe you could try this out to confirm this?

Thanks!

No comments:

Post a Comment