Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I download Ajax Toolkit and added it to my toolbox panel in VS 2008. I installed Microsoft .Net 4.

When i use any ajax control, the below problem happens. For example to use PasswordStrength below error happend:
The TargetControlID of 'PasswordStrength1' is not valid. The value cannot be null or empty.


What should i do in order to resolve this problem?
Thanks
Posted
Updated 4-Jul-10 0:35am
v4
Comments
Sandeep Mewara 4-Jul-10 6:35am    
Re-worded and removed typos.

1 solution

Well, you need to read/know on how to use AjaxControlToolkit controls.

It's very clear that you tried to use a PasswordStrength control. When you were using it, you have not assigned controls action/trigger connected to any other control.
For example, you want that this control checks if the given password in TextBoxA is fine or not. There can be multiple textboxes on the page. Thus, In order to tell PasswordStrength control that you want to check TextBoxA value's strength, you need to connect that to it. This connection can be done using property 'TargetControlID' of the PasswordStrength control.

Just put the property TargetControlID="txtBoxPassword" and you should be done.

Look at the sample here:
PasswordStrength Demonstration[^]
 
Share this answer
 
Comments
hamid.mohammadi.68 4-Jul-10 6:46am    
I download codes and videos from asp.net/ajax but don't run correctly in my pc when i practice by codes error happend.
i changes assemblies in web.config but error happend again.
i add
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagprefix="ajaxToolkit">
below
<add tagprefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
to my web.config
but another error occured :
vs don't accept asp prefix such asp:ScriptManager
Sandeep Mewara 4-Jul-10 6:57am    
Make sure you have installed AjaxToolkit such that you have System.Web.Extensions.dll
Refer that in your project if needed.
Sandeep Mewara 4-Jul-10 6:59am    
Also, make sure your website is AJAX enabled as that would change the Web.config to required need.
hamid.mohammadi.68 4-Jul-10 8:07am    
i've sownload ajaxextension and website run correctly
thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900