How do we reference HTML controls using Atlas?

 Posted by ArticlesMaint on 10/1/2009 | Category: ASP.NET AJAX Interview questions | Views: 4094

<input id="Button1" type="button" value="button" />

You can reference the above HTML defined button using the below code snippet of JavaScript. We have also attached the on click method with the button. This method will be called when we click the button.

var btnVisibility = new Sys.UI.Button($('Button1'));


You can refer other HTML elements like Label, Textbox m Checkbox, Hyperlinks etc using the Sys.UI.

Note: - We have added some extra questions in this edition for Ajax as promised. In CD we have provided ‘AtlasSetup’. This you need to install to get the below Ajax project template in VS.NET 2005.

Figure 18.7 :- Ajax template

One more thing to ensure before we start Ajax is to add the Ajax controls on the tool box. So do the following right click on the tool box ? click choose items ? click ‘Browse’ button ? add ‘C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Atlas\Microsoft.Web.Atlas.dll’. Once done you should see some new components as shown in figure ‘Ajax controls’. Now we are ready to see how Ajax works.

Figure 18.8:-Ajax control

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response