Telerik blogs
  • Web ASP.NET MVC

    Introduction to ASP.NET MVC – slides and demo project

    I had a presentation last week at MS DevDays Bulgaria and I thought I’d share it with you. I was very excited and somewhat nervous - this was my first presentation ever. Nervousness aside, the feeling cannot be compared to anything else – I was glad there are so much people out there who are curious about the topic I’m interested in. It’s a kind of a win-win situation, where the attendees learn something new or see the things from another person’s point of view and the presenter learns even more on the topic from the questions the audience asks. Back to the...
    April 30, 2008
  • Web ASP.NET AJAX

    The dark side of static members

    Often we find it easy to create a class with a static event to keep the controls in our web application loosely coupled. The easiest way to make a number of controls interact without “knowing” about each other is to have a static event distributor class. public class EventDistributor {     public static event EventHandler SomethingHappened;     public static void RaiseSomethingHappened(object sender, EventArgs e)     {         if (SomethingHappened != null)         {             SomethingHappened(sender, e);         }     } } Some of the controls raise the events of the distributor… protected void Button1_Click(object sender, EventArgs e) { …     EventDistributor.RaiseSomethingHappened(sender, e); … } …and others subscribe to them protected void Page_Load(object sender, EventArgs e) {   ...
    April 18, 2008