Showing posts with label toolkit. Show all posts
Showing posts with label toolkit. Show all posts

Wednesday, March 28, 2012

Control Extenders inside View Templates?!?

In the previous versions of the toolkit I could place a control extender inside a view template and everything worked just fine but with today's release (10-20-2006) this appears to have broken.

I have verified this to be true with the TextBox Watermark Extender, the Drop Shadow Extender, and the Rounded Corners Extender.

As an example:

<asp:ScriptManager ID="scriptManager" runat="server" />
<asp:LoginView ID="loginView" runat="server">
<AnonymousTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="tbw" runat="server" TargetControlID="TextBox1" WatermarkText="WaterMark" />
</AnonymousTemplate>
</asp:LoginView>

This code worked fine in the last version but in this version I do not see the watermark.

Is anyone else experiencing this? If there another way to do this?

Thanks

Sean

The fix is to add the following to your page:

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
loginView.DataBind();
}

The reason is outlined here:http://forums.asp.net/thread/1441672.aspx.

control cannot be created because visual studio cannot find the controls type in the contr

Just installed Ajax extensions and ajax control toolkit for Vs2005.All fine.

I can drag drop update panel or script manager.

But if I do so with ajax toolkit controls I get a a error as : "control cannot be created because visual studio cannot find the control's type in the control assembly".

I have downloaded and worked with the toolkit at my home comp and it works all fine. But here at my work its giving me this problem.

I googled up to see any solutions but dint find much help!!

So any help with this would be appreciated!! Thanks!!


Hey guys!!

Anyone for the solution??


Did you remember to register it in the GAC? On your work PC, it may not have done that automagically.


Hey thanks for that.

It did work out.

Strange I have added toolkit on couple of PC's and never saw this error.

Just added the Dll to Gac and the problem is solved on my box.

Thanks.

Consuming a webservice from a custom control extender

I am making a first attempt at writing own extender using the toolkit, and I need to consume a web service. When I Google on Ajax and webservice, I get a lot of articles, but they all seem to involve modifying the ScriptManager tag to point to the web service I want, and you can't rely on that from an extender paradigm. I know the autocomplete control uses some sort of web service, but picking the code out is tough. Is there a plain vanilla, Hello World type of example of how to consume a web service from a custom control extender?

There seems to be a couple of ways to do this, check this post:

http://forums.asp.net/t/1163304.aspx

Although I like mine betterSmile

Hope this helps,

Elias.


Thanks Elias, that's what I was looking for.

Monday, March 26, 2012

Confused about how to add the reference

So, I have the contents from the bin folder of the Sample Website that you get when you download the toolkit. I want to put that in a folder in my solution, so that I can check it into subversion. This means that every developer will always work with the same version of the toolkit.

Now for the problem: for convenience you want to add the controls to your VS toolbox, so you use the .dll in C:\Program Files... But then when you drop a control on a page, the referenced dll is changed to reference the on ein C:\Program Files. To avoid this, you need to add the dll from the solution folder to the VS toolbox, but now your toolbox is depending on one certain project and that's no good.

I'm kind of confused. What is the best way to do this?

Hi,

As far as I know, the assembly isn't necessary to be in the c:\pro... folder.


Yes, it can be anywhere. So what do you do when you want it in your toolbox? If you add it to your toolbox from c:\Program Files and then add a control to your page, you will get a reference to C:\Program Files. If you want the reference to be to a locationinside your solution, you'd have to add the control to your toolbox for each different solution that you are working with because otherwise the reference will be changed to C:\Program Files as soon as drag a control from the toolbox (because the toolbox gets the controls from C:\Program Files).

Do see the problem?

Confused about Atlas July CTP and now AJAX Beta 1

I've been using the Atlas July CTP for my projects along with the Control Toolkit. Now I hear about AJAX Beta 1 (they scrapped the name Atlas right?)
If I wanted to update to AJAX Beta 1, how can I do so? I haven't seen any information about it so far.

Forgive me for my lack of understanding about this, but I'm kind of confused Embarrassed

Thanks!

Atlas was just a code name, it's now the Microsoft ASP.NET AJAX Extensions. If you go tohttp://ajax.asp.net/ there are several downloads as well as migration guides to switch you over from the previous CTPs to the new 1.0 beta. Click the Get Started tab at the top to... get started!

Thanks,

Eilon


Ok thanks that got me started!

But i'm having some problems now. I uninstalled the last Atlas CTP and installed the new AJAX. I also installed the new Toolkit and added a reference to it, and added the controls to the toolbox, but I'm still getting errors on my page. I change my Reference directive to match the new AJAX and updated all the control extenders to say ajax instead of atlas. But I'm still getting errors, especially with control toolkit properties.

Is there a better explanation on updating everything? I'm assuming all my AJAX updated, but the toolkit seems to giving me problems.

Thanks for all the help thus far!!


You may be experiencing some of the same issues some folks have already brought up... however without specific error messages kinda hard to guess what ypou are experiencing...

In terms of the toolkit the biggest item is the fact that the 'extender' controls are now part of the actual control properties. One idea to try is compare what feature you are implementing with how the asp.net code looks like in the example website pages of the toolkit. Additional - the Migration.Doc that is available at the link ref above - will give you some explicit examples on the conversion changes...


ooohhhh so I don't have to setup the properties for the extenders IN the extenders?

I'll look into that.

Thanks!


ok I'm sure the AJAX portion of my project is updated successfully.

I'm still having alot of problems with my control Toolkit. The only controls I have in my project are Accordians. When I load the page I get this error:

Parser Error

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

Parser Error Message:Type'AjaxControlToolkit.Accordion' does not have a public property named'AccordionPane'.

Source Error:

 
Line 260:                                                     ContentCssClass="accordianContent" FadeTransitions="true" 
Line 261:                                                     FramesPerSecond="40" TransitionDuration="250" AutoSize="Limit">
Line 262:            <ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="accordianContent" HeaderCssClass="accordianHeader">
Line 263:                <Header>
Line 264:??????????????? <a href\u003d"" onclick\u003d"return false;" class\u003d"accordianLink"> Communication </a>
\n \n\n\n


\nSource File:/bptWeb/ContactsDetail.aspx ?? Line:262

\n\n\n\n\n\n\n\n",0]);D(["ce"]);//-->Line 264: <a href="http://links.10026.com/?link=" onclick="return false;" class="accordianLink"> Communication </a>
 
I successfully changed my directives and manually updated my web.config like the migration.doc says and I've rebuilt the project, but I still get these problems with the Accordians.
Any ideas? Thanks for the help! 


Are you doing anything with code-behind that used to reference the extender properties? From the snippett above I can't see anything wrong - but if you still have codebehind that references the old extender method then I would assume it would generate an error as such what you are seeing...

Ok I followed the instructions about updating the scriptmanager, but its still giving the error

"Element 'ScriptManager' is not a known element. This can occur if there is a complication error in the website"
Here's what the scriptmanager tag looks like:

<asp:ScriptManager ID="sm1" runat="server" /
I get the same errors for my AccordianPane controls that are referenced in the above post.

I also noticed in the Migration guide it says:


Deletethe old version of Microsoft.Web.dll from the bin directory of yourapplication.

But I didn't have one, I hadMicrosoft.Web.Atlas.dll and I renamed the extension to OLD. Here's what I have in my bin folder (it may help):
AjaxControlToolkit.dll
AjaxControlToolkit.pdb
Microsoft.AtlasControlExtender.dll (??)
Microsoft.Web.Atlas.dll.OLD (this is what I renamed according to the instructions in the migration guide.

Thanks for the quick responses and all the help!


Ok I got the accordian pane working, turns out I forgot to add the new <Panes> tag around the AccordianPanes :)

Does my bin folder look ok now though? Do I need to delete everythign referencing 'Atlas'?

Thanks!


Personally I find having the old dlls in the bin can be a bad thing. Unless you do a clean solution - sometimes that caching of the dll makes things unpredicatble. I move the old dlls out to another folder and after cleaning up all the references and such - then recompile. If you still need to play around with the older Atlas bits - merely just make a copy of your solution and you can play with both without either disrupting the other... It makes it cleaner and you know what you are dealing with..


Great! I'm going to delete them unless you guys say otherwise. I don't plan on going back to Atlas CTP at all.

Thanks!

ConfirmButtonExtender...easy right? Well...

Please help. I'm new to AJAX and the AJAX Toolkit release is new as of yesterday.

I was using code that adds an attribute for a confirm dialog to my button. It works; but I yesterday removed it to start using AJAX.

- I downloaded and installed the Toolkit last night.

- I followed the HDI (How Do I) video to setup VS 2005 Toolbox to display the new AJAX controls.

- I followed the HDI video on using the ConfirmButtonExtender.

- I have a ScriptManager control on my page.

- By following the HDI video, I succeeded with ConfirmButtonExtender in a practice project before trying it in my development project.

So I click the submit button on another page; and now I can't get the scheme to work. Why no confirm message?

Placing the ConfirmDialogExtender allows me to specify which button control to extend. The HTML looks like this:

<asp:ImageButtonID="imbContinue"runat="server"AccessKey="C"ImageUrl="~/images/Continue.gif"TabIndex="5" /><cc1:ConfirmButtonExtenderID="ConfirmButtonExtender1"TargetControlID="imbContinue"ConfirmText="Please confirm!"runat="server"></cc1:ConfirmButtonExtender>
My project existed before AJAX was installed. Do I need to prepare the project somehow to enable AJAX?

(I get NO errors. AJAX seems to be installed properly.)

My next question is going to be how can I connect a custom string to the Button/ConfirmButtonExtender? I build a string during postbacks that occur before the confirmation click occcurs. I thought I'd assign the string to the ConfirmText property under Extender properties on the button.

I would also like to mention that, by following the HDI video, I succeeded with ConfirmButtonExtender in a practice project before trying it in my development project.


Also, I have a ScriptManager control on the dysfunctional page.


I did a few tests.

1. Created a simple page like that demonstrated in the HDI video. It doesn't work in my existing project.

2. Created a new website using the AJAX-Enabled Website template. Then I created the same simple page in this project

Looking at web.config files...Many differences.

I guess I'll try migrating my project to an AJAX-Enabled project.


I copied sections of web.config that existed in the AJAX-Enabled Website project to the web.config of my existing website project.

I had to make sure not to have duplicate sections in my resultant web.config.

I noticed pages on the AJAX-Enabled website specify an updated DOCTYPE. It formerly was XHTML Transitional 1.0. Now it's as follows:

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

I hope I don't have to update the DOCTYPE on all my pages. But maybe it's not a big deal; we'll see.

Also, I had 31 warnings about "schema information not found..."

My research showed that people eliminated these warnings by commenting out the following sections (It worked for me, too):

<!--system.web.extensions-->

<!-- system.webServer>

ConfirmButtonExtender missing property?

Hi,

I'm currently using an AJAX Toolkit 3.5 ConfirmButtonExtender within a ListView (similar to a GridView, for those who know AJAX 1.0 better) and I've placed it within an ItemTemplate in order to confirm the deletion of an item.

<asp:ImageButton ID="deleteItemButton" runat="server" CommandName="Delete" ImageUrl="Images/Icons/user_delete.gif" ToolTip="Delete" />
<cc1:ConfirmButtonExtender ID="confirmButtonExtender" runat="server" ConfirmOnFormSubmit="false" TargetControlID="deleteItemButton" ConfirmText="Delete item?"></cc1:ConfirmButtonExtender>

This works fine, but when I decided to use a ModalPopupExtender together with the ConfirmButtonExtender, I saw that I had to DisplayModalPopupID of the ConfirmButtonExtender to the ID of the ModalPopupExtender. Simple enough - if only this property actually existed on the ConfirmButtonExtender. Perhaps this is something that's just been take away from v3.5 but existed in v1.0? Anyway, I attempted to work around this by not using a ConfirmButtonExtender at all and just linking the ModalPopupExtender to the deleteItemButton. The modal popup displays and hides fine, except that the command doesn't actually get executed. The code for my buttons within the panel shown by the ModalPopupExtender is:

<asp:Button ID="confirmDeleteButton" runat="server" CommandName="Delete" Text="Confirm" /><asp:Button ID="cancelDeleteButton" runat="server" CommandName="Cancel" Text="Cancel" />

Of course, these button IDs are specified via the OkControlID and CancelControlID properties of the ModalPopupExtender, but all to no avail. Could anyone please explain to me where this DisplayModalPopupID property has gone, and more importantly, the correct method to accomplish what I've explained using the AJAX Toolkit 3.5? Thanks...

Alex

Sorry, my mistake. I just realised this property was added to the newest version, which I didn't realise was more recent that mine.

Saturday, March 24, 2012

Configuring VS2005 to use the AJAX Control Toolkit

Hi,

I have installed the lasted version of the ASP.Net AJAX and then downloaded the ASP.Net AJAX Control Toolkit. When trying to add the items to the Toolbox of a new ASP.NET AJAX Web Site raises the following error:

There was an error loading types from assenbly AjaxControlToolkit.dll "Could not load file or assembly System.Web.Extensions, Version:1.0.61025.0", the system couldn't find the specified file.

The file instaled in my system is: ..\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Extensions.dll

How can I fix this problem?.

Thanks

Marco

Matellor:

Hi,

I have installed the lasted version of the ASP.Net AJAX and then downloaded the ASP.Net AJAX Control Toolkit. ... ..\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Extensions.dll

It's sounds like you did not install the latest version. Microsoft.Web.Extensions is from the beta, RC1 has System.Web.Extensions. Make sure you installed RC1 if you're using the latest toolkit.

Configuration Error - install or VISTA problem?

I have just installed the Ajax toolkit and have tried to add an AJAX Update panel to a Content page. I get the below error. Was I suppossed to add something to my WebConfig file? PublicKetTokens were edited for security (was that necessary?)

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=xcxxcxcxcxcxcxcx' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 20: <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=fdfddfdfdfddfd"/>Line 21: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=wewewewewewewewe"/>Line 22: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=xcxcxcxcxxxcxcx"/></assemblies>Line 23: </compilation>Line 24: <pages>


Source File:E:\xxx\xxxx_com\web\web.config Line:22

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=xcxcxcxcxcxcxcxc' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Just discovered that the below statement was added to my configuration file, I think when I may have added a ScriptManager to one of my MasterPages. When I remove it the website starts working. With it in, the website does not pull up at all. (edited PublicKeyToken)

<

addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=vvbvbvbvbvvbvbbvb"/>

Wednesday, March 21, 2012

Compilation Error : Error importing module Tools.netmodule

Hello,

Since I installed the AJAX Control Toolkit, by running the VSI, I get the following error with every application I try to run. I've tried everything in my power to uninstall it but I can't find where it installed. Perhaps it did not complete properly. I've reinstalled the .NET framework 2.0 but this did not correct the problem.

To be able to run at least once, I've had to copy the "Tools.netmodule" file that came in the binaries folder of the AJAX Control Toolkit and paste this file in the folder described below ('c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6f7173d6\de0dfef4\assembly\dl3\371db7e0\003e4f98_695cc701\) then it seems to work for one run. I have to do this everytime. How can I fix this error?

Please help! Error below:

Compilation Error

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

Compiler Error Message:CS0009: Metadata file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6f7173d6\de0dfef4\assembly\dl3\371db7e0\003e4f98_695cc701\Tools.DLL' could not be opened -- 'Error importing module 'Tools.netmodule' of assembly 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6f7173d6\de0dfef4\assembly\dl3\371db7e0\003e4f98_695cc701\Tools.DLL' -- The system cannot find the file specified. '

Source Error:

[No relevant source lines]

Try to remove the "Temporary ASP.NET Files" folder