S
Savas Ates
Im getting error which is like that
The Controls collection cannot be modified because the control contains code
blocks (i.e. <% ... %>)
string refcode;
refcode=Request.QueryString["refcode"];
if ( refcode!=null)
{ refcode=refcode.ToLower();
Session["refcode"]=refcode;
if ( (string)Session["refcode"]=="antu")
{
Control ANTUUST = LoadControl("Skin/ANTUUST.ascx");
Page.Controls.Add (ANTUUST);
}
My control includes only that code
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="ANTUUST.ascx.cs" Inherits="xxx.Skin.ANTUUST"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<table runat="server" id="AutoNumber1" style="BORDER-COLLAPSE: collapse"
borderColor="#111111"
cellSpacing="0" cellPadding="0" width="1000" border="0">
<tr runat="server">
<td width="100%" runat="server">
<IMG id="IMG1" height="180" src="images/antu_ust.jpg" width="1000"
border="0" runat="server">
</td>
</tr>
</table>
The Controls collection cannot be modified because the control contains code
blocks (i.e. <% ... %>)
string refcode;
refcode=Request.QueryString["refcode"];
if ( refcode!=null)
{ refcode=refcode.ToLower();
Session["refcode"]=refcode;
if ( (string)Session["refcode"]=="antu")
{
Control ANTUUST = LoadControl("Skin/ANTUUST.ascx");
Page.Controls.Add (ANTUUST);
}
My control includes only that code
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="ANTUUST.ascx.cs" Inherits="xxx.Skin.ANTUUST"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<table runat="server" id="AutoNumber1" style="BORDER-COLLAPSE: collapse"
borderColor="#111111"
cellSpacing="0" cellPadding="0" width="1000" border="0">
<tr runat="server">
<td width="100%" runat="server">
<IMG id="IMG1" height="180" src="images/antu_ust.jpg" width="1000"
border="0" runat="server">
</td>
</tr>
</table>