I have two usercontrol on same page. 1.ascx and 2.ascx on abc.aspx . Now I need to access dropdown on 1.ascx frm 2.ascx . Plz help me how can i do this?
I have tried Page.findcontrol but as a user control inherits usercontrol class and not page class . its not giving reference to proeprty Page.Findcontrol. I can do page.findcontrol on aspx page but I need to do it on ascx only.
The FindControl method looks for a control in the scope of the current naming container, here is the Page instance, so you need to get reference to the naming container of the dropdownlist, maybe the 1.ascx user control, then you can call the FindControl method. However, like Christian said you'd better use the event/delegate to communicate the user controls, it's much more flexible.
Here's the thing: I have a clickable row under "DEPTNAME". What I want to do is when user click on a particular row i.e consultantdept, it will go to the other page and trigger the dropdownlist to select consultantdept and automatically generate a datagrid that display all data in table A that has consultantdept as a deptname. anyone can teach me how to do that?
You can provide a client side handler for the onclick event of the clickable row, and in the handler you simply redirect to the next page with the id of the selected consultantdept stored in the query string. In the next page, you can query the selected id to populate the dropdownlist as well as the details datagrid (or gridview) control.
You can use the TabStrip Web control and create tabs in it.
For having different pages in it, you can use Multipage web control and you can have different pages in multipage and each page can be linked with each tab.