Knowledge Base
smartDBforms.NET for ASP.NET 2
 
 
Knowledge Base Forum
Testimonials
It’s really refreshing to use. Looking at codegen products that are way overkill and generate source code that’s not maintainable - your product rocks.


I have demoed several other products also, and none came close to yours. The simplicity, ease of use and user friendliness were impeccable.
William Joshua
Madison County Schools


Thanks to smartDBforms.NET I am able to save lots of time and make even better websites. I am looking forward to use this tool to help me build websites based on databases.
Anton Beerens
www.blauwwit81.nl


We are really impressed with smartDBforms.NET and there is nothing else on the market as good.
Andy Jones
Make I.T. Simple
www.makeitsimple.info
Search knowledge base:

HOWTO: Extend templates with AJAX Control Toolkit
Thursday, 03 September 2009
Shows how to extend smartDBforms.NET templates with controls from the ASP.NET AJAX Control Toolkit

SUMMARY

The AJAX Control Toolkit provides a lot of useful controls which could be used in the smartDBforms.NET templates. This tutorial shows how to configure your development environment and extend smartDBforms.NET functionality with AJAX Control Toolkit. An example with MaskedEditExtender is demonstrated for entering phone numbers in specific format.

MORE INFORMATION

Before extending the smartDBforms.NET templates you should make sure that you fulfil all the prerequisites for using AJAX Control Toolkit .

1. Preparing ASP.NET AJAX

ASP.NET AJAX Control Toolkit depends on the ASP.NET AJAX technology. If you are using .NET 3.5 SP1 then ASP.NET AJAX is already installed and you don't have to do anything.. If you have only .NET 2.0 installed then you have to download and install ASP.NET AJAX 1.0

For ASP.NET 3.5 web sites Visual Studio puts automatically all required references in your web.config. For ASP.NET 2.0 you can see how to configure ASP.NET AJAX 1.0 in the following documentation - Configuring ASP.NET AJAX 1.0

2. Preparing AJAX Control Toolkit

The next step is to install AJAX Control Toolkit.  The latest release can be downloaded from AJAX Control Toolkit Downloads. There are two versions - one for .NET 3.5 and one for .NET 2.0. The latest release of AJAX Control Toolkit  that has version for .NET 2.0 is Release 20229.

Open the Get Started with the AJAX Control Toolkit tutorial to learn how to configure Visual Studio toolbox.

3. Extending smartDBforms.NET template set.

The next step is to add a new smartDBforms.NET template which will use Masked input to enter phone numbers.

Open the smartDBforms.NET template set file which is located at <WebSite>/smartDBtemplates/TemplatesStorage.ascx.  Copy and paste the TemplateHolder with ID StringTemplate and set the new ID to PhoneTemplate.

Next step is to drag and drop the MaskedEditExtender from the toolbox over the TextBoxValueString textbox in PhoneTemplate Edit template. After that set the Mask property to (999)999-9999 and ClearMaskOnLostFocus to False.

 

Now the new PhoneTemplate is ready to be used in the new data entry forms.

 

4. Using the new AJAX Control Toolkit template in the database forms.

In order to use the new PhoneTemplate in your form open the form, find the desired field and change its property TemplateID to PhoneTemplate.

In order the MaskedEditExtender to work it requires the ASP.NET page to contain a ToolkitScriptManager control. Just drag and drop the ToolkitScripManager from the toolbox to the top of the ASP.NET page.

CONCLUSION

After the changes the Phone database field allows the users to enter only digits and imposes a predetermined format.

 

 


Page Options: format for printing  Format for Printer

Copyright 2006-2010 Adillis Terms Of Use Feedback Contact Us