?
Solved

Multiple ASP Forms in one Choser Form

Posted on 2004-11-03
14
Medium Priority
?
968 Views
Last Modified: 2012-08-14
Hey experts,

I want to create a choser form in ASP.NET which has a chosing panel on its left, & from this panel, I want to click a button (that redirects to Form 2 for example), and then Form2 would show on the right pane of the choser form. A similar example is in experts-exchange's website in which you can chose different channels by selecting them from the left pane, and on the right pane, the form of the selected channel would appear in the same page (with the left pane remaining in its place).
0
Comment
Question by:mte01
  • 7
  • 6
14 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 12490916
Hi mte01,

you can do this by user controls that receive some id or multiple user controls that are visible=false and depends on the selection from the left a specific user control visible is set to true
i suggest you user control, because it can has its own functionality. you can also use Panels but the functionality will be in the aspx page and it can become large amout of code

Regards!
B..M
mmarinov
0
 
LVL 3

Author Comment

by:mte01
ID: 12491200
I did not fully understand your comment......I want to know specifically how a form can be embedded as part of another form
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 12491223
mte01,
you can not do that
why do you want to embeded form in a form - EE is not like this
Regards!
B..M
mmarinov
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Author Comment

by:mte01
ID: 12491256
I want to do this, so a right pane can show different forms upon different choices of buttons on a left pane......the right pane would be like a a redirection to the forms that I want to be displayed
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 12491268
mte01,

this a logic that you have to do in your code  ( what to show depending on the user's choice )
i do not understand why you have to use more that one <form>

Regards!
B..M
mmarinov
0
 
LVL 3

Author Comment

by:mte01
ID: 12491305
>> i do not understand why you have to use more that one <form>

I have 3 forms......From1, Form2, Form3........I want to design a choser form which has a left pane (LP) & a right pane (RP)......in the left there are three image buttons....IB1,IB2,IB3.....clicking on IB1 would show Form1 in RP,clicking on IB2 would show Form2 in RP, and clicking on IB3 would show Form3 in RP........I hope this is clear by now....
0
 
LVL 28

Accepted Solution

by:
mmarinov earned 1000 total points
ID: 12491378
mte01,

so, what i mean - that this is not forms:)
here the picture

page.aspx

Left pane (Panel control or UserControl )       |       Right pane (Panel control or User Control )

in the Right Pane control you have ( i'll show you with panels )

Panel 1
Panel 2
Panel 3

all 3 panels has
Panel1.Visible = false;
Panel2.Visible = false;
Panel3.Visible = false;

in the Left pane you have

IB1, IB2, IB3
create click event for every one of them and there write down

            Panel1.Visible = depends on the selection;
            Panel2.Visible = depends on the selection;
            Panel3.Visible = depends on the selection;


Regards!
B..M
mmarinov
0
 
LVL 3

Author Comment

by:mte01
ID: 12491420
But I have right now already existing .aspx pages with the data that you want to put on the panel......I don't want to cut & paste the data, and I don't want to have 10 panels over each other on a single page (if I want to have 10 choices)......I want to have a single panel in the right pane that would show one the three web pages that I have already done based on the user selection.
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 12491461
mte01,

look in one aspx page you CAN HAVE ONLY ONE FORM TAG WITH RUNAT=SERVER

something simmilar to my suggestion - show/hide group control ( it can be panel control you can do it as user control )
otherwise you have to manage control by control the visible state wichi is a lot of work that is not needed, but you decided

Regards!
B..M
mmarinov
0
 
LVL 3

Author Comment

by:mte01
ID: 12491570
>> look in one aspx page you CAN HAVE ONLY ONE FORM TAG WITH RUNAT=SERVER

I know, and I have 3 asp pages (each with a single form tag) for the three forms, and I want to do a choser asp page (which is associated with the choser form), in which a right panel contains only a REDIRECTION to one of the three web pages, so they would show internally inside this panel (without actually being inside it)........instead of loading a new page for this page......or doing a group control or panel control like you suggested....
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 12491704
mte01,

ughhhhhhhhhhh,
unfortunately i don't know how can this be done
there was execute method that was actling like this in the old ASP 3.0 but i've never work with it within the asp.net
sorry

Regards!
B..M
mmarinov
0
 
LVL 3

Author Comment

by:mte01
ID: 12491722
Thanks anyway!!!
0
 
LVL 10

Assisted Solution

by:jnhorst
jnhorst earned 1000 total points
ID: 12496090
mte01:

Looking at your conversation above, it looks like you are thinking of forms in the old school asp way, where you can have multiple forms that each post to a different page specified in the action attribute.  mmarinov is right that you cannot do this in ASP.NET because the whole idea of ASP.NET is that the form posts the page back to itself, so you can only have one form on a page.

But this should not prevent you from doing what you are trying to do.  Mmarinov was trying to point you in the direction of user controls.  These are separate files that have what you would otherwise put in each of your forms.  Your user control would basically be the html that would be inside your form tag, just without the form tag.  Then on the page where your user would make a selection, you would respond to that selection by calling LoadControl() to load the control appropriate for the user's selection.  When the user would do something in the control, that info would be posted back to the page into which the control is loaded; namely the one in which your user is making their selection.  Instead of the info being posted to another page in a form tag's action attribute, you handle the user's input in the codebehind of the host page.

You can do what you are trying to do, you just have to reorient your thinking away from using forms to using ASP.NET user controls.

John
0
 
LVL 3

Author Comment

by:mte01
ID: 12497158
Ahaa.....I'll be looking into what you just said.........
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question