How to display different System.Web.UI.UserControl under different circumstances?

Discussion in 'ASP .Net Web Controls' started by mehdi_mousavi, Sep 28, 2005.

  1. Hi folks,

    Consider a System.Web.UI.UserControl, say ProductCtrl, that's supposed
    to display 3 different products based on a given property at run-time.

    <%@ Register TagPrefix="uc1" TagName="ProductCtrl"
    Src="ProductCtrl.ascx" %>
    <uc1:productCtrl id="m_ctrlProduct" runat="server"></uc1:productCtrl>

    for example, if the Brand property is set to "BMW" *at runtime*, the
    control has to display the BMW form, while it'll display the Benz form
    if the mentioned property is set to "Benz". I've got 2 other user
    controls, one for Benz, and the other for BMW. How can I display the
    given UserCtrl, at this page.

    TIA,
    Mehdi
    mehdi_mousavi, Sep 28, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    647
  2. Richard Thompson
    Replies:
    11
    Views:
    573
    Richard Thompson
    Feb 6, 2005
  3. Toon Verstraelen
    Replies:
    2
    Views:
    374
    Donn Cave
    Jan 10, 2006
  4. Ron
    Replies:
    9
    Views:
    608
    CBFalconer
    Mar 10, 2007
  5. Ivo
    Replies:
    7
    Views:
    917
    Roedy Green
    Jun 4, 2009
Loading...

Share This Page