Server Error in '/' Application. Control 'ContentPlaceHolderDefault_BIDCContactForm_3_Button1' of type 'Button' must be placed inside a form tag with runat=server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Control 'ContentPlaceHolderDefault_BIDCContactForm_3_Button1' of type 'Button' must be placed inside a form tag with runat=server.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Control 'ContentPlaceHolderDefault_BIDCContactForm_3_Button1' of type 'Button' must be placed inside a form tag with runat=server.] System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +8910280 .... .... Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
You need to place the following code around where you macro is entered, however there can one be ONE of these special form tags on your site so you may want to put it on the master page.
<form runat="server">
<!--any .net macros must go here-->
</form>
First, sorry for my english 'cos I'm Brazilian, well, my problem is...
My template structure:
HOME (FOLDER WIHT BODY TEXT HOME CONTENT)
|__ Quem somos (subpage with body text content)
|__ Contatos (subpage with body text content)
|__ Noticias (subpage with body text content)
I have a form.ascx in the usercontrols folder and form.ascx.cs in the App_code, up to here ok.
I load this macro without problem in my subpages template (quem somos | contatos | noticias | ...) but in the Home page the componets stop the read code when the code read some like asp:textbox then shows anything more about the form.ascx.
Luiz, ideally you should create a new topic for your specific problem if there arn't enough details in this thread to solve it.
Preferably provide as much information as possible, too, such as error messages and such, rather than 'it stops working', which doesn't really help anyone help you.
Error when create a macro using .NET user control
Dear All
I have a problem
I create a user control
the code
After that i deploy and code *.dll into bin folder and *.ascx to the usercontrol folder of installed umbraco
+Put the *.dll in bin folder into the bin folder of the installed umbraco.
+Put the .ascx file into the usercontrols folder of the isntalled umbraco
Create a macro and browser to the ascx file
Use the macro in the master page
please help me
thank you for your patience
Hi,
You need to place the following code around where you macro is entered, however there can one be ONE of these special form tags on your site so you may want to put it on the master page.
<form runat="server"> <!--any .net macros must go here--> </form>
Hope that helps
Rich
Hi,
Controls must be enclosed between form tags!!
HTH
Sincere regards,
Eduardo
Hi thanh you , rich green and Edurdo. the problem was solved
First, sorry for my english 'cos I'm Brazilian, well, my problem is...
My template structure:
HOME (FOLDER WIHT BODY TEXT HOME CONTENT)
|__ Quem somos (subpage with body text content)
|__ Contatos (subpage with body text content)
|__ Noticias (subpage with body text content)
I have a form.ascx in the usercontrols folder and form.ascx.cs in the App_code, up to here ok.
I load this macro without problem in my subpages template (quem somos | contatos | noticias | ...) but in the Home page the componets stop the read code when the code read some like asp:textbox then shows anything more about the form.ascx.
Can somebody help me?
Luiz, ideally you should create a new topic for your specific problem if there arn't enough details in this thread to solve it.
Preferably provide as much information as possible, too, such as error messages and such, rather than 'it stops working', which doesn't really help anyone help you.
is working on a reply...