ASP.NET
  Home arrow ASP.NET arrow Developing Conditionally Driven Event Hand...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Developing Conditionally Driven Event Handlers in ASP.NET 3.5
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2010-03-15

    Table of Contents:
  • Developing Conditionally Driven Event Handlers in ASP.NET 3.5
  • Choice of Programming Language
  • Step 1: Creation of the Web Form
  • Step 2: Creating the Click Event Handler

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Developing Conditionally Driven Event Handlers in ASP.NET 3.5


    (Page 1 of 4 )

    What is a conditionally-driven event handler, and why would you want to use one? Basically, such an event handler will perform its assigned action -- such as displaying text on the screen -- if and only if a certain specified condition is met. As you might imagine, such event handlers have a range of uses. This article will walk you through some examples in ASP.NET 3.5.

    You should have gained a basic understanding and formulation of event handlers in ASP.NET from this tutorial. Now if you need to go more deeply into this aspect of developing ASP.NET 3.5 web applications, one of the most important tools you can use is "conditionally driven" event handlers.

    Let's consider one of the examples given in a previous tutorial, namely the web application to compute the area of the circle. Suppose you want to alter the project and say the application can only compute the areas of circles with radii greater than 100 and rejects values below that. You will need to employ some kind of conditional server side scripting which will analyze user inputs. And then it will fire the event depending on the user input. This is an example of a conditionally-driven "click" event handler.

    Other types of event handlers discussed are the "page load" type of handlers. This will fire the event at any time the page is requested to the server. To make conditionally-driven page load handlers, server side scripting will analyze user inputs are needed, in a way that is similar to what is done in click event processing.

    For example, say you are going to make an application which will display "Good morning" in the browser if the server time is 6 AM or "Good evening" if the server time is 8 PM. Things like this need to have some conditional statements added to your ASP.NET server side scripts.

    More ASP.NET Articles
    More By Codex-M


     

    ASP.NET ARTICLES

    - ASP.NET 3.5: User Access Rules
    - ASP.NET 3.5: Creating Role Based Security wi...
    - ASP.NET 3.5 Role Based Security and User Aut...
    - Canonicalizing DotNetNuke URLs in ASP.NET 3.5
    - ASP.Net 3.5: User Account Creation for Your ...
    - ASP.NET 3.5 Basic User Account Management
    - Generate Dynamic Title Tag based on QueryStr...
    - Add a Blog Module in DotNetNuke
    - ASP.NET 3.5 Basic Navigation Controls
    - Create ASP.NET 3.5 Sitemap XML for Navigatio...
    - Completing Basic DotNetNuke Website Developm...
    - DotNetNuke Website Development in ASP.NET 3.5
    - ASP.NET Querystring: Basic Dynamic URL Forma...
    - InsertItemTemplate FormView Example in ASP.N...
    - Using the FormView Web Control in ASP.NET 3.5





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek