<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="3" DataKeyNames="qid" DataSourceID="SqlDataSource5" GridLines="Vertical" onselectedindexchanged="GridView1_SelectedIndexChanged" style="margin-left: 23px" Width="582px" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" AllowSorting="True"> <AlternatingRowStyle BackColor="#DCDCDC" /> <Columns> <asp:BoundField DataField="qname" HeaderText="qname" SortExpression="qname" /> <asp:CommandField ShowSelectButton="True" /> </Columns> <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <RowStyle BackColor="#EEEEEE" ForeColor="Black" /> <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#F1F1F1" /> <SortedAscendingHeaderStyle BackColor="#0000A9" /> <SortedDescendingCellStyle BackColor="#CAC9C9" /> <SortedDescendingHeaderStyle BackColor="#000065" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:tuitionConnectionString %>" SelectCommand="SELECT * FROM [question] WHERE (([sid] = @sid) AND ([aid] = @aid) AND ([cid] = @cid))"> <SelectParameters> <asp:ControlParameter ControlID="DropDownList2" Name="sid" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="DropDownList3" Name="aid" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="DropDownList4" Name="cid" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:tuitionConnectionString %>" SelectCommand="SELECT * FROM [answer] WHERE ([qid] = @qid)" onselecting="SqlDataSource6_Selecting"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="qid" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:FormView ID="FormView1" runat="server" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="SqlDataSource6" GridLines="Both" onpageindexchanging="FormView1_PageIndexChanging" DataKeyNames="qid"> <EditItemTemplate> ansid: <asp:Label ID="ansidLabel1" runat="server" Text='<%# Eval("ansid") %>' /> <br /> ansdesc: <asp:TextBox ID="ansdescTextBox" runat="server" Text='<%# Bind("ansdesc") %>' /> <br /> sid: <asp:TextBox ID="sidTextBox" runat="server" Text='<%# Bind("sid") %>' /> <br /> aid: <asp:TextBox ID="aidTextBox" runat="server" Text='<%# Bind("aid") %>' /> <br /> cid: <asp:TextBox ID="cidTextBox" runat="server" Text='<%# Bind("cid") %>' /> <br /> qid: <asp:TextBox ID="qidTextBox" runat="server" Text='<%# Bind("qid") %>' /> <br /> <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" /> <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /> </EditItemTemplate> <EditRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" /> <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" /> <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" /> <InsertItemTemplate> ansid: <asp:TextBox ID="ansidTextBox" runat="server" Text='<%# Bind("ansid") %>' /> <br /> ansdesc: <asp:TextBox ID="ansdescTextBox" runat="server" Text='<%# Bind("ansdesc") %>' /> <br /> sid: <asp:TextBox ID="sidTextBox" runat="server" Text='<%# Bind("sid") %>' /> <br /> aid: <asp:TextBox ID="aidTextBox" runat="server" Text='<%# Bind("aid") %>' /> <br /> cid: <asp:TextBox ID="cidTextBox" runat="server" Text='<%# Bind("cid") %>' /> <br /> qid: <asp:TextBox ID="qidTextBox" runat="server" Text='<%# Bind("qid") %>' /> <br /> <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" /> <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /> </InsertItemTemplate> <ItemTemplate> <br /> ansdesc: <asp:Label ID="ansdescLabel" runat="server" Text='<%# Bind("ansdesc") %>' /> <br /> <br /> </ItemTemplate> <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" /> <RowStyle BackColor="White" ForeColor="#330099" /> </asp:FormView>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)