Saturday, September 19, 2009

ASP.NET AJAX

  1. Create a ScriptManager and UpdatePanel. An UpdatePanel can be inside an UpdatePanel
  2. I've 2 independent UpdatePanel in a page. 1 UpdatePanel has a Label and Button other has a Button
  3. Let the 2 button's event update the Label.
  4. What should I do to make sure that the second Update Panel's button click to not to update the Label and what should I do to make sure that the second Update Panel's button click to update the Label

Don't get confused by how the debug behaves, even if the event is hit, it doesn't mean the value will get updated. The Ajax behavior is not very well integrated in the IDE.

Let the page mentioned above consumes a user control. Drag a ScriptManager into the UserControl. Now run the application and see what happens.

The Ajax Control Toolkit has a lot of extender controls. Extender means it extends or works with the traditional ASP.NET Controls

UserControl

  1. Create a user control which has a Label and Textbox
  2. Consume that UserControl in a page
  3. Try to set the Label and TextBox values by using UserControl.Controls approach
  4. How easy it will be if we can expose setting and getting of the controls inside UserControl through property?

UserControl does not have some events which a Page have. Do you know what events are not supported in UserControl?

3-Tier

  1. Create a simple web-site and use SQL DataSource directly in the aspx page, create a GridView and populate some data
  2. Now remove the SQL Datasource and create a class call it DAL which does the SQL calling and get the DataSet. Sonsume that class's method in aspx to do DataBind
  3. Now try to create a Business Entity and hydrate the Business Entity in the DAL and pass it to the aspx using a dummy Business Layer Class

Kudos you've created a 3-Tier Application

Event Delegate

I've been into training freshers in my account for the past 1 year. The best way to learn programming is to do some stuffs or see how an experienced professional is doing it. I just hate ppts, most ppl will be sleeping.

Here I'm presenting some case studies which can be used to understand both OOPs and .NET Concepts.

Create a Console application which has a class, which has a method that accepts 2 integers and outputs the sum, the class also has a property which computes the cumulative sum, i.e, if you first call sum(1,3) and then call sum(5,6), the cumulative sum is 15. The class should raise an event when the cumulative sum is > 20 (and then reset the cumulative sum to zero). Consume this class and register a delegate and show a console.write whenever the event gets fired

Using Word for Blogging

Just came to know that we can use MS Word for blogging.
I'm trying this for my other blog and I like this idea. The Blogger UI for creating and editing is still very rudimentary and polishing the blog using MS Word and then publishing it right from Word is cool.
Its been around for many many years but I knew it only this week.