A page can have only one server-side Form tag - ascx page within a web page

I have a web user control in my web page.  The user control (ascx) consist of a text box and button. The web page consist of text boxes and buttons also.  Both pages have form tags with runat=server.  When I run the web page it comes up with the error "A page can have only one server-side Form tag." Both the user control and web page need the form tag with runat=server.  Is there a way I can code these pages where there won't be a conflict between the web user control and the web page? Thanks

 

0
JohnMo
3/23/2006 2:43:37 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
1307 Views

Similar Articles

[PageSpeed] 39

JohnMo wrote:
Both the user control and web page need the form tag with runat=server.

Hi,

why would you need that? A user control gets placed upon a webform which already contains a server side <form> tag. And yes: there can be only one.

Grz, Kris.


Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0
XIII
3/23/2006 2:49:13 PM
Reply:

Similar Artilces:

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

System.Web.HttpException: A page can have only one server-side Form tag.
have anyone had this error message before 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: A page can have only one server-side Form tag. 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...

System.Web.HttpException: A page can have only one server-side Form tag.
Exception Details: System.Web.HttpException: A page can have only one server-side Form tag. What could this error message mean? I don't have any <Form> tags in my page. The message is because you cannot have more than a single form tag with Runat=server. For some reason, ASP.NET really does think that you have more than a single form. Are you including files or using user controls with runat=server form tags?Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog Here is my code. What I tried before the error is connecting twice to a database. Could...

System.Web.HttpException: A page can have only one server-side Form tag. What is the Solution
Hello Every One,i want to add two forms with runat server attribute on same page But i got error errorSystem.Web.HttpException: A page can have only one server-side Form tag.Any Solution to resolve this errorThnksKunal MehtaWeb professionals who refuse to update their skills and insist on using outdated methods can no longer be called web professionals. Why do you want to do so? I guess you are still using the classic ASP mentality, tell me what are your goals, we can find another way of doing them in ASP.NET Regards  Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MV...

Page.render giving the A page can have only one server-side Form tag error
Hi I am trying to get the current pages output (html) as string and send it to a different server. I have the following code Dim sResultantHTML As StringDim sb As New StringBuilder Dim SW As New StringWriter(sb)Dim htmlTW As New HtmlTextWriter(SW) Page.RenderControl(htmlTW)Dim pageHTML As String = sb.ToString() htmlTW.Flush() sResultantHTML = SW.ToString() htmlTW.Close() But upon executing I am getting the 'A page can have only one server-side Form tag error'. My page is in ASP.NET 1.1 with VB.NET code behind. Can somebody help   Thanks GVI Do you have two FORM...

A page can have only one server-side Form tag
First: No I don't have multiple form tags. I have one and only one in the master page. NO OTHER. Here's the scenario: The form and the post back is happening on the master page.  If I only have one level of nesting in my master pages (i.e. only the main parent master page) everything is fine and dandy.  However if I have a second master page then the post back causes the above error even though the page displays correctly when there is no post back.  So this scenario works: Master Page with post back control ----------Default.aspx  But this doesn't Mast...

how to open a web page in form of a popup web page
Hello, I have two web pages, let say. Page A : With a Button on it. PAge B: with some info. Now I need to: When I click on the Button of page A.Page B must open in a pop up window.  I can do this but problem is this when I clicked on the button for first time it does not show me any thing and when I clicked on the button for second time then It shows me Page B .My code is as follow:  1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!this.Page.IsPostBack) 4 { 5 6 } 7 else 8...

All web pages hang on web server when one of the web pages calls a run away sql query
Hi: We have a Windows 2003 dedicated web server running the .NET Frameworks 1.0 and 2.0.  We have a SQL Server cluster running SQL Server 2000.  Unfortunately, we do not have a test environment.  I have 2 .NET web sites in production.  My coworker has a voting .NET web page using AJAX on the same server.  The coworker wrote a query that was not indexing properly and when the page fired the query...the cluster went to almost 100% utilization.  My two web pages would hang and show a blank white page on the default.aspx.  Neither of m...

A page can have only one server-side Form tag.
what can i do for this problem please help  artemis24 wrote:what can i do for this problem please help Explain why you see the need to have two server side form tags. Then, maybe someone will be able to help you out. -- Tarjei You may have a look at: Multiple Forms and Non-PostBack FormsRegardsBilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP i once need to fill a datgrid and then i need to email the html page thats why i need two buttons but i havn't used two form tags i do not know why it gives such an error. i rewsolved the problem by redirecting a my page...

a page can have only one server side form tag
i have a masterpage with a treeview surrounded by a form with runat=server tag.. i am using this as the menu..   i created a page off this masterpage and added a login control to the contentplaceholder and surrounded this by form tag with runat=server.. i get the error below;  "a page can have only one server side form tag" i read up something about setting the forms visible tag to false but i'm really not sure how to go about it..is it thus impossible to use the login control in this way? pls help..        post your code  -------------------...

A page can have only one server-side Form tag
Hi, I have a web page which has server side include for top, left, main and bottom.aspx pages. In the left.aspx, there is a login web control which has a pair of form tags. In the main page, there is a registration form which has a pair of form tags. So, there are 2 pairs of form tags in one index.aspx page. I cannot run it and it prompted the error of "A page can have only one server-side Form tag". I removed the </form> for left.aspx and <form> for main.aspx. It cannot run also as it said the respective form tag was missed. So, how can I handle a...

A page can have only one server-side Form tag
I'm using masterpages...In the top field I always want to display a search textbox.But in the pages that I load into my masterpages I want to display a contact form and a registration form. Now it seems I have to choose whether I want to have the search form in my masterpage or the other forms in my normal pages....is there a workaround?Can I perhaps not use a server-side form for my search functionality? this is not preferred but if there's no other way please explain me how to implement this...please mark answers as 'Answered' and post back solutions when you figure stuff out that...

A page can have only one server-side Form tag?
Hello    when i use (base.Render(htw)) i get this error:A page can have only one server-side Form tag,I would like to send this web form to an email.What can i do?Thank you.Manou private void SendItemButton_Click(object sender, System.Web.UI.ImageClickEventArgs e) { StringBuilder sb = new StringBuilder(); HtmlTextWriter htw = new HtmlTextWriter(new StringWriter(sb)); // Render page base.Render(htw); string strHTML = sb.ToString();}...

A page can have only one server-side Form tag.
I am getting an error on some of my forms when creating a web application. This in not happening on all of them, but only a few. I got rid of my bin directory and did a rebuild. Anyone know what I am doing wrong?The honor belongs to the man who is in the ring, who's hands are marred with dust, sweat, and blood. For even if he fails, he fails having tried greatly, such that his place shall never be amongst those cold timid souls who knows neither victory or defeat Do you have more than one server side form tag on a single web form? Sorry for asking the obvious.Jamie Kindred, CGA, MCSD ...

A page can have only one server-side Form tag
Problem:I use a masterfile. The page account.aspx loads in contentplaceholder3. I have created a form in my account.aspx, but when I try to add a 'ASP:textbox' field to my contact.aspx , I get a: "'TEXTBOX' must be placed inside a form tag with runat=server" error. When I do this, I get a: "A page can have only one server-side Form tag" error. So I don't know what to do now!thxplease mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already. Hi Peter, What version of ASP.Net are you using?Jamie Kindred, CGA, MCSD Microsoft .NET F...

Web resources about - A page can have only one server-side Form tag - ascx page within a web page - asp.net.web-forms

Server-side scripting - Wikipedia, the free encyclopedia
... unfocused, scattered, unnecessary details. WikiProject Technology or the Technology Portal may be able to help recruit an expert. Server-side ...

Google Cloud Platform simplifies server-side development for iOS w/ ‘Mobile Backend Starter’
... Mobile Backend Starter that first debuted for Android developers back in June. Google says the application helps to simplify the server-side ...

Free Cooling: the Server Side of the Story
Servers that support higher inlet temperatures could significantly reduce or even eliminate the cooling costs of the data center. We received ...


[Update: Check Now] Play Store For Android Gets Search Bar With Hamburger Flip In Server-Side Update
Google is pushing out an update to the Play Store's Android interface that replaces the action bar with a standard search bar. Inside are the ...

Server-side update makes Siri a stickler for succinctness
Siri is already well known for her wit and willingness to joke, but a recent server-side update has given Apple's digital assistant the ability ...

Japanese RIAA wants server-side music DRM for mobile phones
The Recording Industry Association of Japan—the Japanese version of the RIAA— …

New BaaS platform aims to eliminate writing server-side code
... offering for desktop and mobile developers that's now leaving its beta phase. By removing the need for writing code on the server-side, Backendless ...

Dart improves async and server-side performance
... Team Today's release of the Dart SDK version 1.3 includes a 2x performance improvement for asynchronous Dart code combined with server-side ...

Customize Google Using Server-Side Scripts
Google's services have a lot of powerful features, but they can't offer all the options requested by users. A popular way to customize Google ...

Resources last updated: 12/25/2015 3:55:30 AM