| Author: varun 05 Sep 2008 | Member Level: Gold | Rating: Points: 6 |
Hi gandhi,
detail.ascx is a user control page and IIS does not render user control page directly to the browser. You have to use that user control page in a aspx page. User control page starts with header like this:
//C# <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyControl.ascx.cs" Inherits="MyControl" %>
Create a new aspx page and add the following line at the top of the page after the @Page declaration:
<%@ Register Src="MyControl.ascx" TagName="MyControl" TagPrefix="uc1" %>
where src=name of your ascx page TagName and Tagprefix you will use to add that control to your aspx page.
For example, in your aspx page, you will add the user control like this:
<uc1:MyControl id="id1" runat="server" />
Feel free to contact me if you face any problem...
varun
|