26 July:: Supported OS
26 July:: Supported OS
Installation Process:
Make sure we are logged in with an account that has administrator rights(if our account does not have administrator rights the installation process displays errors the system administrator has set policies to prevent this installation. Download the AspAjaxExtSetup.msi installer package from the Asp.Net Ajax download website. Now in order to install just double click on MSI5 it starts automatically installation process in we can optionally provide the installation. If we do not provide it takes automatically by default. Once the installation is done, we can create an Asp.Net website enhanced with Ajax in Visual Studio 2005 and if we create an Asp.Net website in Visual Studio 2005/08/10/12 simply we create Asp.Net website or Asp.Net empty website. In which we can get to work on Asp.Net Ajax extension controls. These are the followings: ScriptManager ScriptManagerProxy Timer UpdatePanel UpdateProgress
ScriptManager:
It manages a script resource for client components, partial page rendering and custom user scripts. The script manager is required in order to use UpdatePanel, UpdateProgress and Timer. A ScriptManager control is a non visual component on the page and this control required on each page that needs to have Ajax features implementation. A ScriptManager control should be only one on the page that needs Ajax feature functionality. Eg: <asp:ScriptManager id=sm runat=server> </asp:ScriptManager>
ScriptManagerProxy:
ScriptManagerProxy should be used on the content pages that have master pages or web user control containing a script manager control. <asp:ScriptManagerProxy id=SMP runat=server>
</asp:ScriptManagerProxy>
UpdatePanel:
The UpdatePanel allows us to refresh selected parts of a webpage, instead of refreshing the whole page by using asynchronous post back. This control is a container that contains any other html as well as Asp.Net controls This control has two child tags: 1. ContentTemplate 2. Triggers The ContentTemplate tag is required, since it holds the content of the panel. The content can be anything that we would normally put on our page from literal text to any web controls which required being update as partial update. The Trigger tag allows us to display certain triggers which will make the panel update is content
27th July:
Eg: Working with UpdatePanel control to get current server date and time using asynchronous request. 1. First create a ScriptManager control on to the aspx page 2. Now we create UpdatePanel control in which a specify ContentTemplate tag and in that place a button control through which we make asynchronous button control post back and place a label control to display Updated current date and time from the server. <asp:ScriptManager ID=SM runat=server> </asp:ScriptManager> <asp:UpdatePanel ID=UP runat=server> <ContentTemplate> <asp:Button ID=Btn runat=server text=Current Date and Time from Server Onclick=Btn_Click/> <br/> <asp:Label ID=lblDateTime runat=server>
</asp:Label> </ContentTemplate> </asp:UdatePanel> Code Behind: Btn_Click() { lblDateTime.Text=DateTime.Now.ToString(dddd dd MMMM yyyy hh:mm:ss tt); } Note: ScriptManager control uses a property i.e. EnablePartialRendering set to true by default to allows asynchronous post back for the UpdatePanel control on support a browser.