Showing posts with label toolbox. Show all posts
Showing posts with label toolbox. Show all posts

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!

Monday, March 26, 2012

cc1 and cc2 prefix for controls

All --

Please help.

After upgrading from AjaxBeta2 to AjaxRC1, I now get some strange prefixes for the controls when I drag them from the Toolbox to an ASPX page, as follows...

<cc1:autocompleteextender id="AutoCompleteExtender1" runat="server" />
<cc1:dragoverlayextender id="DragOverlayExtender1" runat="server" />
<cc1:profileservice id="ProfileService1" runat="server"></cc1:profileservice>
<cc2:script id="Script1" runat="server" />
<cc1:timercontrol id="TimerControl1" runat="server"></cc1:timercontrol>
<asp:scriptmanager id="ScriptManager1" runat="server"></asp:scriptmanager>
<asp:scriptmanagerproxy id="ScriptManagerProxy1" runat="server"></asp:scriptmanagerproxy>
<asp:timer id="Timer1" runat="server"></asp:timer>
<asp:updatepanel id="UpdatePanel1" runat="server"></asp:updatepanel>
<asp:updateprogress id="UpdateProgress1" runat="server"></asp:updateprogress>

...so my question is...

Why do some controls use the expected "asp:" prefix and other use the odd "cc1:" or "cc2:" prefix?

How can this be fixed so that all controls use the same prefix, "asp:"?

Please advise.

Thank you.

-- Mark Kamoski

hello.
well, normally that is something that is defined by the programmer that builds the control through the use of the?taprefixattribute.?what's?happening?is?that?probably?the?controls?of?the?toolkit?didn't?define?that?prefix?and??now?you?get?a?default?prefix?when?you?drag?the?control?to?the?designer.