Control <> of type <> must be placed inside a form tag with runat=server

Hi,

I created a User Control and tried to place it in the header but I get the following error message
Control 'Header1_cal_DropDownList1' of type 'DropDownList' must be placed inside a form tag with runat=server.

Why does this happen ?
It also does not work for Calendar and Textbox.
Thanks
Gslick

0
gslick
11/19/2004 1:46:00 PM
asp.net.issue-tracker-kit 722 articles. 0 followers. Follow

1 Replies
994 Views

Similar Articles

[PageSpeed] 51
Get it on Google Play
Get it on Apple App Store

Hi Gslick,

Thanks for downloading the Issue Tracker!
Unfortunately, the Header.ascx and Footer.ascx files do not include the opening and closing <form runat="Server"> tags. These tags are contained in the individual pages.
This means that you cannot use any ASP.NET controls which require placement in a server-side form tag (such as a DropDownList) within the Header.ascx file. You'll need to add these controls to the individual pages.
Hope this helps!
Stephen Walther
0
swalther
12/1/2004 2:04:50 AM
Reply:

Similar Artilces:

How to strip a string of <html>, ,</html>, <body>, </body>, <form ... >, </form> tags?
I have stream which is the HTML input of a page. Now I want to use only that part of this page, that is within <form .....> and </form> tags, and excluding these tags.How would I go about stripping <html>, ,</html>, <body>, </body>, <form ... >, </form>, <head> and </head> tags? I have to make sure that <head ...javascript..> and its corresponding </head> tags are not stripped in this process.sun21170    Wait... you said you wanted to strip the head tags, and you're also saying you need to NOT strip the ...

Need Help With <form runat=server></form> Tags
Hello everyone I have a real newbie question for anyone that wants to help me out...... I am creating a e-commerce website right now (yes a massive project for me) and I am having this problem. I have set up my site with a master page and then the content pages. On my master page I have a login view and inside that login view I have a login name <asp:LoginName ID="LoginName1" runat="server"> I just draged and dropped it so when my users are signed in they can see a welcome message... this login name requires a <form runat=server> Tag in which I've placed in it....(this works ...

Firefox issue with dynamic height inside <form></form> tags
Maybe someone else has experienced this and has a work around.I have a site with a master page that has an iFrame the I load a dynamic URL into, all code works fine. In IE I have no problems but in firefox if the iFrame with the height as a % does NOT resize to the right height if the iframe is inside the <form></form> tags.I've copied the rendered html and put it in a plain html page and when I remove the form tags I have no problems. Has anyone encountered this?Below is my posted .aspx code I've put the style inline in the iFrame for ease of viewing, before it was in a ...

Is it possible to run custom controls in <title><meta> tags without placing the form tag at the start of the page?
Hi, I have created a group of custom controls to allow users/designers to edit the design of dynamic pages easily without doing any code, basically they get given the custom controls and can drop them into web pages and it pulls up the appropriate information when ran on my server (from the querystring/public properties etc), sounds great so far. But my problem is that I want them to be able to put the tags into other parts of the page outside of the body tag, including the pages metadata/title etc eg <title><mytag:pagename runat="server"></title> ...

Lists in .net
Like a good AKA accessible app building developer, my application's navbar is controlled with CSS and using <ul> and <li> I just have the code in the HTML display and it works fine when everything should be visible, however, I need to restrict some users from viewing certain navbar links based on their security levels.  How do I hide the list items that need to be hidden? TIA hello! give them ids and runat="server" attribute. then in code behind set the Visible property to false. orzeh code less, think more! Okay, I tried putting the link as a link bu...

Migration Issue. (The type '<component type>' exists in both <file1.dll> and <file2.dll>)
The type 'CrystalDecisions.CrystalReports.Engine.ReportDocument' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.2.3600.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll' and 'c:\WINDOWS\assembly\GAC\CrystalDecisions.CrystalReports.Engine\10.0.3300.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll'    D:\Limewise\Research\pbk2005\App_Code\ui\CRReportDocument.cs    10    103    D:\...\pbk2005\...

>>>> Heads up <<<<
I just got a warning from Norton that "PamelaSetup-Basic.exe" has a virus in it. The name is "VirusBurst" Luckily, I did not install this software and Norton's quarantined it so I could delte it, which I have done. Symantec has not completed analysis of this particular piece of garbage but it did catch the sig. If you have installed Pamela, you may be in trouble. Duffy wrote: > I just got a warning from Norton that "PamelaSetup-Basic.exe" has a virus > in it. The name is "VirusBurst" > > Luckily, I did not install...

data controls that output <div> and not <span> or <table> tags
 hi are there any controls that can output <div>?or can someone show me how to build my own controls for displaying data in div format?  Hi,use a Repeater control. Probably, haven't tested it myself, in .NET 3.5 you could also use the ListView for this.Grz, Kris. Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons....

Custom Composite Control
Let's start with what I'm looking for: <controls:MyWrapper id="Blah" runat="server">     <content>         <controls:Exporter id="Blah1" runat="server"  {This control has an image button and some other controls} />         <controls:GridView {This is a fully functional GridView} />         <controls:CustomFooterDetailer id="Yadda" runat="server" /> &nb...

>>>> ROOT Exploit in SAMBA <<<<<<
"A flaw has been detected in the Samba main smbd code which could allow an external attacker to remotely and anonymously gain Super User (root) privileges on a server running a Samba server. This flaw exists in previous versions of Samba from 2.0.x to 2.2.7a inclusive. This is a serious problem and all sites should either upgrade to Samba 2.2.8 immediately or prohibit access to TCP ports 139 and 445." http://us3.samba.org/samba/samba.html Binaries are available from Samba for RedHat, and some other distributions. So far as I can tell, the RedHat update mirrors I norm...

superreview granted: [Bug 238989] whitespace after a </b> tag is ignored when enclosed inside <fieldset></fieldset> tags : [Attachment 145302] This should fix it
Peter Van der Beken <peterv@propagandism.org> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 238989: whitespace after a </b> tag is ignored when enclosed inside <fieldset></fieldset> tags http://bugzilla.mozilla.org/show_bug.cgi?id=238989 Attachment 145302: This should fix it http://bugzilla.mozilla.org/attachment.cgi?id=145302&action=edit ------- Additional Comments from Peter Van der Beken <peterv@propagandism.org> Fine by me, although I don't really understand why we'd want kOmitWS at all. ...

superreview requested: [Bug 238989] whitespace after a </b> tag is ignored when enclosed inside <fieldset></fieldset> tags : [Attachment 145302] This should fix it
Boris Zbarsky <bzbarsky@mit.edu> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 238989: whitespace after a </b> tag is ignored when enclosed inside <fieldset></fieldset> tags http://bugzilla.mozilla.org/show_bug.cgi?id=238989 Attachment 145302: This should fix it http://bugzilla.mozilla.org/attachment.cgi?id=145302&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> So the problem here was that <fieldset> was marked as a tag which is allowed to discard all direct child whitespace...

What if I remove <form id="form1" runat="server"></form>
If I am creating an aspx page, which does not need to be a form, i.e. no input is taken from the user, do I need to encapsulate the whole page with in  <form1 runat="server">   What are the implications of removing the form? I realize there will be no viewstate, and again, I won't be able to accept user input, but will everything else work as expected? It seems to be so far, I've just not seen ANY examples where the form tag has been removed. Thanks, Darragh You need the server-side form tag if you are going to have server-side controls on the form.RyanRyan Olshan...

can I delete <form id="form1" runat="server"> and </form>
Hi: Our website is written by using simple html code, one of the page has some virtual shopping cart code with <form> ....</form>, (for example here: http://www.centercoin.com/coin_supplies/coin_collecting_starter_set.htm ), if I have 10 products, I will have 10 of <from> ...</form> in this page, that is ok. Now, I am trying to redesign the website using asp.net2.0, I notice all the asp page will automatically create a <form id="form1" runat="server"> ...</form>, such as: <html xmlns="http://www.w3.org/19...

Web resources about - Control <> of type <> must be placed inside a form tag with runat=server - asp.net.issue-tracker-kit

Resources last updated: 1/15/2016 1:55:24 PM