is this possible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

can this be done?
I want to display different web user controls based on the selection from
the user.
 
Sure thing. There are lots of ways to do this. You could put each user
control in a asp panel object (all set with visible and enabled properties
set to false). Then when a user makes a selection, such as in a dropdown or
clicking a linkbutton, you capture the event and set the visible and enabled
properties for that particular panel to true. You can also have a
placeholder object that you could dynamically load the needed user control
into.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Yes. You can load different user controls dynamically. Try this;

Control myControl = Page.LoadControl("myControl.ascx");
Then you can add this control to a place holder for example like below; (Or
to a table etc..)

myPlaceHolder.Controls.Add(myControl );

Hope this helps,

Ethem Azun
 
Hi Mike,
can this be done?
I want to display different web user controls based on the selection from
the user.

It would take far less time to tell you what CANNOT be done:

....

All finished. Next time you want to know if something can be done in
ASP.Net, just refer to the ellipsis. Whatever is in that list cannot be
done. ;-)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
BTW, I didn't mention all the ways that this can be done, as there are
so-o-o many. Mark has listed a few.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
thanks guys for all the suggestions. I actualy used Mark's method with the
panels and it works like a charm. thanks
 
Back
Top