User Control

Posted on 2011-10-10
Last Modified: 2013-12-16

I have 2 user controls , and I hve 2 tables for (Male,Fmale)
I need when I change the gender , it will be change in second user control for names
Note : I connect with sql jun in load event.
1- Gender (Male,Female)
Question by:samprg

    Author Comment

    I need to change data source at runtime
    LVL 9

    Expert Comment

    I am not very clear with your explanation.. I believe you want to load your user control 2 with names based on the gender change in another user control 1.. if so then,

    set AutoPostBack for the gender dropdown control as true
    OnChange, based on the gender selected select the names from the respective tables(Male, Female) and bind it to the UserControl2 where you want to display the names

    Hope this helps

    Author Comment

    Can I do that with  ajax?
    LVL 9

    Accepted Solution

    yes you can...
    place those user controls inside a updatepanel control...

    Author Closing Comment

    Thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video discusses moving either the default database or any database to a new volume.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now