Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2005, 05:49 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default Including more than one form in ASP.NET

Dear All,

Can any one tell me how I can include more than one from in a ASP.NET page, as it generates error if try to do so.

Although I have included two forms with in one form tag, but it also has problems.

Take the scenario like you want to provide facility of filling of form and search on one page.

Thanks

Amit:)
 
Old January 6th, 2005, 05:55 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You cant include more than one form in ASPX page.
 
Old January 6th, 2005, 05:56 AM
Authorized User
 
Join Date: Mar 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not sure why you want to have 2 forms in a page but as I was concern, ASP.Net will only allow 1 form per page.



 
Old January 6th, 2005, 06:07 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have included two froms one for filling form and other for search as user control( with ascx extention) in a aspx page. If while filling form I press enter it directly takes me to the search form result. The reason is both are under the same form tag.

I am sure some must have faced the same problem and must have solution.

thanks

Amit

 
Old January 6th, 2005, 06:13 AM
Authorized User
 
Join Date: Mar 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You shouldn't use tag <form> in your user control file. Just start with your html codes without <form> tag.

 
Old January 6th, 2005, 06:17 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Check out :: http://aspalliance.com/articleViewer.aspx?aId=132&pId=

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old January 6th, 2005, 06:30 AM
Authorized User
 
Join Date: Oct 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Thanks, I think the link has given some valid reasons for allowing only one form in a page. One more thing you can't use form tag in user control.thanks for prompt replies.

Amit








Similar Threads
Thread Thread Starter Forum Replies Last Post
send parameters from asp page to an asp.net form hastikeyvan ASP.NET 1.0 and 1.1 Basics 2 March 29th, 2008 01:32 AM
Converting an HTML Form to ASP.Net Form k_alidxb75 ASP.NET 1.x and 2.0 Application Design 0 November 30th, 2006 03:26 AM
including header file(.h) in .NET karveajit General .NET 0 March 17th, 2006 12:41 AM
asp.net form to act like old asp form namaste Classic ASP Basics 0 July 25th, 2003 01:29 AM
asp.net form to act like old asp form namaste VB How-To 0 July 25th, 2003 01:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.