Click here to Skip to main content
11,637,415 members (60,902 online)
Click here to Skip to main content
Add your own
alternative version

Custom Exception Framework: Using Enterprise Library Exception Handling Block

, 30 Oct 2008 CPOL 41.6K 898 41
This article demonstrates a working model of a custom Exception block using Enterprise Library Exception Handling Block which is built around MVP architecture.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Calculation.aspx.cs" Inherits="Calculation" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    
    <asp:Panel runat=server ID=pnlError Visible=false>
    <img src="Img/cross.JPG"  />
    <asp:Label ID="lblException" runat="server" Font-Bold=true ForeColor=Brown ></asp:Label>
    </asp:Panel>
   
       
        <asp:Label ID="lblResult" runat="server"></asp:Label>
        <table>
            <tr>
                <td style="width: 69px" >
                </td>
                <td>
                    <span style="font-size: 11pt; font-family: Courier New"><strong>Math Operation</strong></span></td>
                <td>
                </td>
            </tr>
            <tr>
                <td style="width: 69px"  >
                    <strong><span style="font-size: 10pt; font-family: Courier New">Number 1</span> </strong>
                </td>
                <td>
                    <asp:TextBox ID="txtNumber2" runat="server"></asp:TextBox></td>
                <td>
                </td>
            </tr>
            <tr>
                <td style="width: 69px" >
                    <strong><span style="font-size: 10pt; font-family: Courier New">Number</span> 2</strong></td>
                <td>
        <asp:TextBox ID="txtNumber1" runat="server"></asp:TextBox></td>
                <td>
        <asp:Button ID="Button1" runat="server" Text="ADD Numbers" OnClick="Button1_Click" /></td>
            </tr>
        </table>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

santosh poojari
Technical Lead
India India
Whatsup-->Exploring--> MVC/HTML5/Javascript & Virtualization.......!
www.santoshpoojari.blogspot.com

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150728.1 | Last Updated 30 Oct 2008
Article Copyright 2008 by santosh poojari
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid