First , i want ask you excuses for my bad english.
Well, i'm a beginner in c# but i need it to my work in this time.
I have a SqlDataSource1 with "SELECT field1 from table1"
I have an Accordion linked with SqlDataSource1, and inside of Accordion1 i have a SqlDataSource2 with "Select field2 from table2 where id=!!!!! here i need use field1 from SqlDataSource1!!!!!!"
If i put in SqlDataSource2 a explicit value it run good. But i don`t get put like parameter in SqlDataSource2 the value of field1 of SqlDataSource1.
Field1 (value1)
Field2
Field2
Field1(value2)
Field2
Field2
Field2
...
...
The code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:XEUSERACO %>"
ProviderName="<%$ ConnectionStrings:XEUSERACO.ProviderName %>"
OnSelecting="SqlDataSource1_Selecting"
SelectCommand="SELECT field1 from table1"
>
<cc1:Accordion ID="Accordion2" runat="server" SelectedIndex="0" FadeTransitions="true"
FramesPerSecond="40" TransitionDuration="250" AutoSize="None" [B]DataSourceID="SqlDataSource1"[/B] ContentCssClass="Content" HeaderCssClass="HEADER">
<HeaderTemplate>
<table border="1">
<tr>
<td>
[B]<%# Eval("Field1") %>[/B]
</td>
</tr>
</table>
</HeaderTemplate>
<ContentTemplate>
<table border="1">
<tr>
<td>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:XEUSERACO %>"
ProviderName="<%$ ConnectionStrings:XEUSERACO.ProviderName %>" OnSelecting="SqlDataSource2_Selecting"
SelectCommand="SELECT field2 from table2 where [B]id=!!!!here i need put param field1 rom SqlDataSource1!!!!!!"[/B] >
</asp:SqlDataSource>
<asp:Repeater runat="server" DataSourceID="SqlDataSource2" ID="articles">
<ItemTemplate>
[B]<%# Eval("field2") %>[/B]
</ItemTemplate>
</asp:Repeater>
</td>
</tr>
</table>
</ContentTemplate>
</cc1:Accordion>
Thank you very much.