Click here to Skip to main content
12,888,825 members (50,483 online)
Click here to Skip to main content

Stats

60.7K views
1.6K downloads
24 bookmarked
Posted 16 Oct 2009

How to Create an Event for a User Control

, 16 Oct 2009 CPOL
Article on how to create a user defined event for a user control
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Src="~/ctrlCalculator.ascx" TagPrefix="Calculator" TagName="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></title>
</head>
    <body>
        <form id="form1" runat="server">
            <div>
                <%-- user defined control that will perform the mathematical operation --%>
                <Calculator:Calculation ID="ctrlCalculartor" runat="server" OnCalculating="ctrlCalculator_Calculating"></Calculator:Calculation>
            </div>
        </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

farazsk11
Web Developer
United Arab Emirates United Arab Emirates
Faraz is working as a Senior Software Engineer for a company located in Sharjah, UAE. He likes developing new applications with the latest technologies. Mostly reponsible for web applications using Microsoft.Net. He has done MCPD so far. Other than work play guitars, sing and play PSP.

You may also be interested in...

Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 16 Oct 2009
Article Copyright 2009 by farazsk11
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid