Click here to Skip to main content
15,881,882 members
Articles / Web Development / ASP.NET

Embedded UserControls: Revisited

Rate me:
Please Sign up or sign in to vote.
4.83/5 (19 votes)
7 Jan 20076 min read 187K   1.4K   64  
Embedding UserControls in .NET assemblies is easy with VS2005 SP1
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DemoSite._Default" %>

<%@ Register Assembly="ControlLibrary" Namespace="ControlLibrary" TagPrefix="cc1" %>

<!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">
    <div>
        <cc1:EmbeddedUserControlLoader ID="EmbeddedUserControlLoader1" runat="server" AssemblyName="ControlLibrary"
            ControlClassName="HelloControl" ControlNamespace="ControlLibrary" />
    
    </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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions