Thank you very much in advance. I did my due diligence and researched for 2 days, but I can't seem to imagine what the online tutorials describe.
Situation: A lead programmer takes off and leaves. The company owner knows what I did (newbie) VB.NET on the side and asked to connect functionality between two user controls in my intranet application (written in C #. A little consideration for answering questions - I am fluent in Visual Studio .. but still learning C #).
Here's a simplified description of the controls, but hopefully enough to get us moving in the right direction:
UserControl_1 contains several link buttons that, when clicked, should change the value of the SelectParameter parameter used by the ObjectDataSource in UserControl_2:
<asp:LinkButton ID="OpenBtn1" runat="server" Text="Show Open Requests" />
<asp:LinkButton ID="ClosedBtn1" runat="server" Text="Show Closed Requests" />
UserControl_2 (GridView with DataSource):
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetDataBy_Status"
TypeName="adhoc_TblAdptrs.adhoc_TblAdptr">
<SelectParameters>
<asp:Parameter DefaultValue="All" Name="status" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView1 ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" />
What I would like to do is pass the new default value for the SelectParameter parameter of the ObjectDataSource to UserControl_2. I look forward to an individual explanation from professionals! Your help is much appreciated!
source
share