Click here to Skip to main content
12,065,204 members (43,765 online)
Click here to Skip to main content
Add your own
alternative version


15 bookmarked

Multiple form submittion with validator control in ASP.Net

, 19 Jan 2007
Rate this:
Please Sign up or sign in to vote.
This article provide you knowlege about how you can handle multiple form submittion in ASP.Net
<!-- Article Starts - DO NOT ADD HTML/BODY START TAGS-->

Sample Image - Multiple_form_submittion.jpg


In past I am not able to use two different section of form submit in ASP.Net 1.0 or 1.1using validation control. Now .Net Framework 2.0, it is possible to submit no of different section of form. On the other hand, in normal HTML we can place two or more form object for posting the data. Asp.Net can’t support the multiple form tag but there was different process to do same.

<asp:Label  ID="lblUsername"
            Text="User Name : "
            Runat="server" />
<asp:TextBox    id="txtUsername"
            Text="*(Required)" />

 <asp:Button id="btnSubmit"
            OnClick="onClick_btnSubmit" />

Above code show you how you will perform the submit function each section respective validation control. For separating each section by “ValidationGroup” keyword, you can seen here I used “ValidationGroup” same for the textfield, validator control and button on which I will display the message. You can create multiple submittion for no of group submittion of data distinctly.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Nimit Patel
Web Developer
Canada Canada
I am always dream to good cricket player of indian team. I am cricket loving guy. I had passed my post graduation from IGNOU at vadodara, Gujarat,India. Presently working on, C#, sql server, php, mysql.

You may also be interested in...

Comments and Discussions

GeneralIt's possible to have multiple webforms/page Pin
Jan Seda20-Jan-07 11:25
memberJan Seda20-Jan-07 11:25 
GeneralRe: It's possible to have multiple webforms/page Pin
Sergey Rybalkin21-Jan-07 5:19
memberSergey Rybalkin21-Jan-07 5:19 
GeneralRe: It's possible to have multiple webforms/page Pin
Jan Seda21-Jan-07 7:24
memberJan Seda21-Jan-07 7:24 

It's pretty simply but you must spend a loooong time to study WebForm and Page class internals. Anyway I'll publish the code as open source.
There is another opensource implementation called WilsonWebForm but it has some isssues (primary when working with get method, validation and viewstate is not removed or optimized - this is what I've solved).
You can check my component working on my website as I wrote before. If you would try to search for a job then this is using custom WebForm class using GET method. Then you'll see it's ID in URL query as "openwf". Beside of this form you can find the stardard one below enabling postback pagination.

I had old layout of a week ago; ASP.NET login control in top of the page so I had page layout "POST above GET above POST" forms on my page. And it was working without any problems.

This control is functional in 1.x and 2.x Wink | ;)

There is also another solution and it's using PHP + our .NET compiler Phalanger. It's working GREAT and you can benefit from simple and powerful PHP rendering + strong .NET backend Wink | ;) You can only choose.

Jan Seda

P.S. I sent this enhancement to Microsoft as MVP enhancement proposal and I was told that developers don't need to use multiple or GET forms per page Laugh | :laugh: Laugh | :laugh:

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160204.4 | Last Updated 20 Jan 2007
Article Copyright 2007 by Nimit Patel
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid