Multiple "Forms" in a Web Form.

Hi, this query relates to ASP.NET 2.0. I use C# but answers in C# or VB.Net is fine.

I have a form to capture a person's details. The form is the usual forename, surname, etc. and the Person is held in a Person Class.

What I want to be able to do is to move the form creation into a Class in a separate Class in App_Code. This will enable a button to be placed on the web form to "Add Another Person" using the class. This would create a new Person object and write a new form into the page for the second person to fill in their details. Naturally, this could continue to n Persons with n Forms.

Or it would if I knew the best way to programmatically create and add a new form to a container from a class and also how best to store new Person objects so I could retrieve their values later. The n forms would all exist within the same server <form></form> elements.

Any suggestions as to the best way to approach this?

Thank you in advance,

Richard

P.s. The form would live between this section of asp.net script but this of course could be any container.

<ajaxToolkit:TabContainer ID="Persons" runat="server">
 <ajaxToolkit:TabPanel ID="Person" HeaderText="Person" runat="server">
  <ContentTemplate> ... </ContentTemplate>
 </ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>


2 * 3 * 3 * 37 : The prime factorisation of The Beast.
0
VirtualRichard
1/18/2008 9:40:20 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

0 Replies
1042 Views

Similar Articles

[PageSpeed] 3

Reply:

Similar Artilces:

superreview requested: [Bug 410500] Add "Web form password" description to web form keychain items : [Attachment 295140] fix
Stuart Morgan <stuart.morgan@alumni.case.edu> has asked Mark Mentovai <mark@moxienet.com> for superreview: Bug 410500: Add "Web form password" description to web form keychain items https://bugzilla.mozilla.org/show_bug.cgi?id=410500 Attachment 295140: fix https://bugzilla.mozilla.org/attachment.cgi?id=295140&action=edit ...

superreview denied: [Bug 410500] Add "Web form password" description to web form keychain items : [Attachment 295140] fix
Mark Mentovai <mark@moxienet.com> has denied Stuart Morgan <stuart.morgan@alumni.case.edu>'s request for superreview: Bug 410500: Add "Web form password" description to web form keychain items https://bugzilla.mozilla.org/show_bug.cgi?id=410500 Attachment 295140: fix https://bugzilla.mozilla.org/attachment.cgi?id=295140&action=edit ------- Additional Comments from Mark Mentovai <mark@moxienet.com> Not localizable :( ...

Create web form with Web Matrix "error"
I have created the web form (Filterd Data Report) with Web Matrix, but when I run the following error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed.Source Error: Line 62: Sub DataGrid1_SelectedIndexChanged(sender As Object, e As EventArgs) Line 63: Line 64: Function MyQueryMethod(ByVal empno As...

Is "Session" the best solution for transfering variables between "Web Forms"??
Hi all; I am using an ASP.NET Web Application (with VB.NET)... and this App used to manage customers' requests.. so, ther user will handel customer#1 data for a while, then he (the user) will handle the data of customer#2. and so on.. And I need to transfer some variables value from one page (Web Form) to onother pages (Web Forms), Is the "Session" variable the BEST solution? and do you recommend me to increase its live to 60 mins or more. (In case the user need approx. 1 hour to handle customer#1 data!!)?? Example of values I want to transfer: CustomerID, RequestNo, Co...

Sharepoint help! Error msg : "A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe"
hihi, I have set up a testing virtual server on my local machine. I installed win server 2003, wss 2.0, sql server 2000, and visual studio .net 2003. i tried to create a project in C# but when i build it and import the web part (.dwp) into the page, there is this error msg "A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe"  I seached most of the sites and they informed that the problem lies in the safe control in web.config i enter the safe control in web.config but i does not know where to put ...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

<form id="form" runat="server">
hey i have a very similar problem to this thread http://forums.asp.net/thread/1440587.aspx"Control 'ctl00_ContentPlaceHolder1_Login1' of type 'Login' 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 'ctl00_ContentPlaceHolder1_Login1' of type 'Login' must be placed inside a form tag with r...

Need to have a form "in front of" login form that would open the login form.
Hello: I need to show a web app I have built to a client who does not have a web site.  Their app will be on a site I use for testing.  I want to put a"testapp" button on a form that then starts their app.    The client's app has a login control, however, so when I call up that app's default page, the login page appears as it should. Can I put another web page "in front of"  the login page that would have a button to call the default page which then would cause the login page to come up?  If not possible, can I have 2 asp.net 2.0 apps runn...

multiple web forms and the "2 clicks required" conundrum
Here's an interesting one...and applicable to most web sites out there... I have an "all-in-one" login page that (should) allow you to login, register, or resend your password... for discussion sake I call these three web forms, not one. The login and register forms have validator controls that need to be disabled depending on the "active" form. See it here: www.PCawe.com -> click login link To set a form as "active" I have a textchanged event that fires for the *first* textbox for a particular form...the event code disables the validator controls fo...

I've placed <forms loginUrl="home.aspx"></forms> in web.config and now all users that log in go to default.aspx
I've placed <forms loginUrl="home.aspx"></forms> in web.config and now all users that log in go to default.aspx.        <authentication mode="Forms">        <forms loginUrl="home.aspx"></forms>      </authentication>What attribute I should add, to make the user stay on the same page. Btw when I remove  <forms loginUrl="home.aspx"></forms>, users stay on the same page after login.Thanks. try one of these.....

<authentication mode="Forms">forms name=".AUTHCOOKIE"
Hi there, I used authentication mode="Forms" with AUTHCOOKIE. my web.config looks like this <system.web> <authentication mode="Forms"><forms name=".AUTHCOOKIE" loginUrl="default.aspx" protection="All" /> </authentication><machineKey  validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" /><authorization> <deny users="?" /> </authorization>   </system.web>    So far so good, but ... I have a f...

2 script tags, Script Language="javascript" and Script runat="server" in a web form.
Where should i place the javascript portion in the webform if i already had my <script runat="server"> (VB) place afterthat? Mark up: i understand that it should have 2 script tags used in the web form.  <SCRIPT LANGUAGE="JavaScript"> var isNN = (navigator.appName.indexOf("Netscape")!=-1); ...etc</script> <script runat="server">     Dim x, iRow, iCol, noRec As Integer   Dim i As Integer ... etc. <script> <asp:Content ID="First" ContentPlaceHolderID="aad"...

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

Web resources about - Multiple "Forms" in a Web Form. - asp.net.web-forms

Resources last updated: 11/28/2015 7:18:59 AM