Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have the following simple usercontrol:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HelloWorld.ascx.cs" Inherits="HelloWorld" %><h1>HelloWorld</h1><p><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></p><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
Hey Thor,
Is the user control wrapped in a <form runat="server"> tag?
Rich
no
do I need to have a form tag in my template?
Hi,
You need to wrap the usercontol in a <form runat="server"> if you want to use runat="server" controls
Sorry, crosspost.
Yes, put it in your template, you can put it just after your body tag in your master template as there can only be one per page.
I can see I need that - thanks :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Usercontrols - what am I doing wrong?
I have the following simple usercontrol:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HelloWorld.ascx.cs" Inherits="HelloWorld" %>
<h1>HelloWorld</h1>
<p><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></p>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
Hey Thor,
Is the user control wrapped in a <form runat="server"> tag?
Rich
no
do I need to have a form tag in my template?
Hi,
You need to wrap the usercontol in a <form runat="server"> if you want to use runat="server" controls
Rich
Sorry, crosspost.
Yes, put it in your template, you can put it just after your body tag in your master template as there can only be one per page.
Rich
I can see I need that - thanks :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.