File: Control.ascx
<%@ Control Language="C#" ClassName="PropertyRandomImage" %>
<%@ Import Namespace="System.IO" %>
id="imgRandom"
Width="300px"
Runat="server" />
id="lblRandom"
Runat="server" />
File: Default.aspx
<%@ Page Language="C#" %>
<%@ Register TagPrefix="user" TagName="PropertyRandomImage" Src="~/Control.ascx" %>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Show Programmatic