user control error in asp.net and c#

Posted by reddysankark-13471 under ASP.NET on 8/9/2012 | Points: 10 | Views : 1243 | Status : [Member] | Replies : 1
hi,

i got error in user control its showing error in my page as error rendering control-UcHeader1 an unhandled exception has ocurred html anchor properties.why this type of error is coming please tell me i am new in this field

my page

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmBrandsDetails.aspx.cs" Inherits="Admin_CatalogManagement_frmBrandsDetails" Title="E-Postal Services Network" %>

<%@ Register Src="Controls/ucBrandsList.ascx" TagName="ucBrandsList" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
&nbsp;
</asp:Content>

my user contraol

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucBrandsList.ascx.cs" Inherits="Admin_CatalogManagement_Controls_ucProductList" %>
<table style="width:100%; border:0" cellpadding="0" cellspacing="0">
<tr>
<td style="width:100%" align="left">
<asp:LinkButton ID="lbtnAddRecord" Text="Add New Record" runat="server"></asp:LinkButton>
</td>
</tr>
<tr>
<td style="width:100%" align="left">
<asp:Panel ID="pnlProductList" runat="server" ScrollBars="None" Width="100%">
<asp:DataList ID="dlResult" runat="server" RepeatColumns="1" Width="100%" OnSelectedIndexChanged="dlResult_SelectedIndexChanged">
<HeaderStyle BackColor="Navy" />
<ItemStyle BackColor="ActiveBorder" />
<AlternatingItemStyle BackColor="ButtonFace" />
<HeaderTemplate>
<table style="width:100%; border:0" cellpadding="0" cellspacing="0">
<tr>


</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>

sankarreddy


Responses

Posted by: Vikash on: 8/12/2012 [Member] Starter | Points: 25

Up
0
Down
Sir, first of all you have only opening tag of the <HeaderTemplate> tag .
So make approriate closing tag & then try again............

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucBrandsList.ascx.cs" Inherits="Admin_CatalogManagement_Controls_ucProductList" %>
<table style="width:100%; border:0" cellpadding="0" cellspacing="0">
<tr>
<td style="width:100%" align="left">
<asp:LinkButton ID="lbtnAddRecord" Text="Add New Record" runat="server"></asp:LinkButton>
</td>
</tr>
<tr>
<td style="width:100%" align="left">
<asp:Panel ID="pnlProductList" runat="server" ScrollBars="None" Width="100%">
<asp:DataList ID="dlResult" runat="server" RepeatColumns="1" Width="100%" OnSelectedIndexChanged="dlResult_SelectedIndexChanged">
<HeaderStyle BackColor="Navy" />
<ItemStyle BackColor="ActiveBorder" />
<AlternatingItemStyle BackColor="ButtonFace" />
<HeaderTemplate>
<table style="width:100%; border:0" cellpadding="0" cellspacing="0">
<tr>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>


Regards,
Vikash Pathak

reddysankark-13471, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response