Hai,
      r u trying to add a textbox control in codebehind then in the page after the button place a panel or placeholder.And in the codebehind add the textbox to the panel as follows
 
in Code behind
 
TextBox TxtBox = new TextBox();
TxtBox.ID = "TxtRName";
TxtBox.Text = "Test";
TxtBox.Width=100;
PnlName.Controls.Add(TxtBox); 

after button,
<asp:button >
<asp:PlaceHolder id="PnlName" runat="server"></asp:PlaceHolder >
 
try this.
 
 
Rajesh.S

csharp_r <[EMAIL PROTECTED]> wrote:
Hi, when i want to add a control (for example TextBox) in a webform in
click event of a Button, it has an error like this:
"Control '_ctl0' of type 'TextBox' must be placed inside a form tag
with runat=server"
what's this and how i can solve this problem ?




Yahoo! India Matrimony: Find your partner now.

YAHOO! GROUPS LINKS




Reply via email to