Hi I tried the same by using cs code also
since this is my first project not able to understand this.
please help
Dropdownlist
<asp:dropdownlist id="doddl" datasourceid="sds1" runat="server" autopostback="True" appenddatabounditems="True" xmlns:asp="#unknown">
DataTextField="DoNumber" DataValueField="DoNumber" Width="250px" OnSelectedIndexChanged="doddl_SelectedIndexChanged">
<td align="right"><asp:sqldatasource id="sds1" runat="server" xmlns:asp="#unknown">
ConnectionString="<%$ ConnectionStrings:InvoiceConnectionString %>"
SelectCommand="SELECT [DoNumber] FROM [ItemParent]">
</td>
Detail view
<asp:detailsview id="DetailsView1" datasourceid="sds2" runat="server" height="50px" width="492px" autogeneraterows="False" xmlns:asp="#unknown">
BackColor="White" GridLines="None" Visible="False" BorderColor="#336666" BorderStyle="Solid"
BorderWidth="1px" CellPadding="4">
<footerstyle backcolor="#FFFFCC" forecolor="#330099" />
<rowstyle backcolor="White" forecolor="#330099" />
<fields>
<asp:boundfield datafield="CompName" headertext="CompName">
SortExpression="CompName">
<asp:boundfield datafield="CompAdd" headertext="CompAdd">
SortExpression="CompAdd" />
<asp:boundfield datafield="Tel" headertext="Tel" sortexpression="Tel" />
<asp:boundfield datafield="Fax" headertext="Fax" sortexpression="Fax" />
<asp:boundfield datafield="ContPerson" headertext="ContPerson">
SortExpression="ContPerson" />
<asp:boundfield datafield="SalesPerson" headertext="SalesPerson">
SortExpression="SalesPerson" />
</fields>
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<editrowstyle backcolor="#FFCC66" font-bold="True" forecolor="#663399" />
<tr>
<td>
<asp:sqldatasource id="sds2" runat="server" xmlns:asp="#unknown">
ConnectionString="<%$ ConnectionStrings:InvoiceConnectionString %>"
SelectCommand="SELECT CompName, CompAdd, Tel, Fax, ContPerson, SalesPerson FROM CustomerDetails WHERE (CusId = @CusId)">
<SelectParameters>
<asp:sessionparameter name="CusId" sessionfield="CusId">
Type="String" />
</SelectParameters>
</td></tr>
Grid view
<asp:GridView ID="PrintGv" DataSourceID="sds3" runat="server" BorderWidth="1px" GridLines="None" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" Width="849px" BorderColor="#336666"
BorderStyle="Solid" Visible="False">
<Columns>
<asp:BoundField DataField="ItemNo" HeaderText="ItemNo" SortExpression="ItemNo">
<FooterStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Left" Width="20px" VerticalAlign="Top" BackColor="#FF99FF"
BorderStyle="Solid" BorderWidth="1px" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description">
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" BackColor="#FF99FF" BorderStyle="Solid"
BorderWidth="1px" />
</asp:BoundField>
<asp:BoundField DataField="Qty" HeaderText="Qty" SortExpression="Qty">
<HeaderStyle HorizontalAlign="Left" Width="10px" VerticalAlign="Top" BackColor="#FF99FF"
BorderStyle="Solid" BorderWidth="1px" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="sds3" runat="server"
ConnectionString="<%$ ConnectionStrings:InvoiceConnectionString %>"
SelectCommand="SELECT [ItemNo], [Description], [Qty] FROM [Items] WHERE ([DoNumber] = @DoNumber)">
<SelectParameters>
<asp:ControlParameter ControlID="doddl" DefaultValue="2011SCL001-Do"
Name="DoNumber" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>