Multiple ASP Forms in one Choser Form

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).
LVL 3
mte01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mmarinovCommented:
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
mte01Author Commented:
I did not fully understand your comment......I want to know specifically how a form can be embedded as part of another form
0
mmarinovCommented:
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
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

mte01Author Commented:
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
mmarinovCommented:
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
mte01Author Commented:
>> 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
mmarinovCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mte01Author Commented:
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
mmarinovCommented:
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
mte01Author Commented:
>> 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
mmarinovCommented:
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
mte01Author Commented:
Thanks anyway!!!
0
jnhorstCommented:
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
mte01Author Commented:
Ahaa.....I'll be looking into what you just said.........
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.