How to publish an AJAX enabled,
with the AJAX Control toolkit, web application with Visual Studio 2008 on your Mochahost hosting server.- Prerequi sites:
- AjaxControltoolkit.
- First create a new subdomain or virtual directory on your control panel (plesk)
b. Click on Create Subdomain
c. Select Subdomain on subfolder if you want to create a subdomain on a subfolder of your maindomain.
d. Select only the asp.net option
Attention: if you remove files from your maindomain don’t delete or remove all the subfolders. One of them will be this subdomain !
f. The subdomain is succesfull created when you see following message
- Check if ASP.NET 2.0 is enabled on your virtual directory or new subdomain.
c. You see following panel. Check your values and check the ASP.NET version! 2.0.50727
- Make a copy of your subdomain or virtual web directory and files so you have the automatically generated web.config.
- Set the default page of your domain to default.aspx. You can configure it as follow :
b. Click on Directory properties icon
c. Here you can define different properties. To select the default.aspx and index.aspx as first page to load move the pages to the top.
5. Open Visual Studio 2008 and create a new webapplication.
- Copy the web.config file over the new web.config file or merge it.
Following section must be available in the web.config file
- Check if the AJAX and ASP.NET 3.5 assemblies are defined in the assemblies section
- When you drag an AJAX Control on your webpage you will find a line which register the ajax control toolkit on your page. You can define this also in the web.config file so you don’t need that line on each asp.net page
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
And you can add it into your web.config file as:
`
`
- The demo page uses two labels, a button, an updatepanel and a textbox with a date time control extender.
In our sample the project must be published to demo.mochahost.com/httpdocs/demo
Click on the publish button (right click on the project and click on publish) and test your application on the server.
- Result: To prove the AJAX enabled webpage you can see that when you click on the textbox a calendarcontrol will be displayed and when you click on the button
the label change but the first timestamp will not change.


