Showing posts with label extenders. Show all posts
Showing posts with label extenders. Show all posts

Saturday, March 24, 2012

Problem adding toolkit to the web.config on my server

I am trying to add the toolkit to my server's web.config so that I do not have to register the toolkit on each page that I use the extenders on. I have added the following config items but am receiving the error listed below when I attempt to use a control. Is there an issue with using the extenders on master pages? Everything works fine from a VWD perspective, intellisense picks up the toolkit controls just fine. The error only occurs on the server. Any help would be greatly apprectiately.

I have added the following to the <compilation><assemblies> section:

<add assembly="AjaxControlToolkit, Version=1.0.10618.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>

I have also added the following within the <system.web> section:

<pages>
<controls>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit" />
</controls>
</pages>

Error text:


Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Unknown server tag 'ajaxToolkit:TextBoxWatermarkExtender'.

Source Error:

Line 48: ErrorMessage="User Name is required." Display="dynamic" ToolTip="User Name is required." ValidationGroup="ctl00$ctl00$Login1">*</asp:RequiredFieldValidator>Line 49:Line 50: <ajaxToolkit:TextBoxWatermarkExtender id="wm1" runat="server" TargetControlID="UserName" WatermarkText="Username" />Line 51: </td>Line 52: </tr>

The problem turned out to be an issue with the AJAX Extension configuration in the web.config. To fix it I just copied the info from the web.config from the Extensions install directory.


I am trying to do this right now too. Could you provide a little more detail about your fix? Where is the Extensions install directory? And what info did you copy from the web.config?

Also, how do I determine what the proper assembly info to use (i.e. version# and public key token...)

Thanks!


The path for the Extensions install directory on my dev machine is:

C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025

That should be the default path for the AJAX Extensions installer.

Located in that folder should be a web.config file. All of the info in there needs to be copied into the web.config for your app. You'll have to make sure you aren't duplicating sections if you just paste the whole bit in your config. Posted below is a direct copy of the web.config for your convenience.

As for the issue of knowing which version and public token, I just take those from the samples. In the case of the Extensions, the config below lists the correct info and you shouldn't have to change it. For the case of the toolkit, the version will be the same as the release you are currently using. As for the public token, I'm not entirely sure about that as I have not updated my toolkit to the newest release. If you figure that out post back here to have it documented. (I'll do the same when I upgrade)

I hope this helps solve your issue.

<configuration> <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" /> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" /> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <system.web> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls> </pages><!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="false"> <assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </assemblies> </compilation> <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> </httpHandlers> <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </httpModules> </system.web> <system.web.extensions> <scripting> <webServices><!-- Uncomment this line to customize maxJsonLength and add a custom converter --> <!-- <jsonSerialization maxJsonLength="500"> <converters> <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/> </converters> </jsonSerialization> --> <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --> <!-- <authenticationService enabled="true" requireSSL = "true|false"/> --> <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes. --> <!-- <profileService enabled="true" readAccessProperties="propertyname1,propertyname2" writeAccessProperties="propertyname1,propertyname2" /> --> </webServices><!-- <scriptResourceHandler enableCompression="true" enableCaching="true" /> --> </scripting> </system.web.extensions> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </modules> <handlers> <remove name="WebServiceHandlerFactory-Integrated" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </handlers> </system.webServer></configuration>

Problem in ajax popup extender

Hi,

I have a problem in advanced ajax extenders. I am unable to use 2 or 3 types of extenders on same page.

I made a page in which 3 times , i used the pop extender in which i added the asp:calander tag.

Only the first date , it works. If i try it for second date..It is unable to pick the date...

Please give me solution.

Regards,

Deepika Kubba

Hi,

could you show us some code?

Problem In CollapsablePanel Extender

Hi Frnds,

I m new to Ajax, and i m using some toolkit extenders for my application.

When i declared a Label and an Image in the Header Panel of a CollapsablePanelExtender, its displaying controls on separate lines.

but i want to display label on the left side and image on right side.

Is there any tech to do like this since its taking more space and looking bad.

thanks in advance

Regards

Hasan

Hi Hasan,

I think you problem is a CSS related issue. Actually, itemplate header works as a div container but it is not recommended to changes its CSS directly. We suggest that you add another container (div) and add css style to the newly added container. For example,

<div style="width: 100%;">
<asp:Label ID="Label1" runat="server" Text="Label" Style="float: left"></asp:Label>
<asp:Button ID="Button2" runat="server" Text="Button" Style="float: right" /></div>

Another way is using a Table to control its showing position.

Best regards,

Jonathan