📄 editcourse.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditCourse.aspx.cs" Inherits="Manager_EditCourse" MasterPageFile="~/TQMS_Master.master"%>
<asp:Content ID="EditCourse" ContentPlaceHolderID="main" runat="server">
<table height="100%" width="100%">
<tr>
<td width="5">
</td>
<td colspan="2">
<asp:FormView ID="FormView1" runat="server" DataKeyNames="TQ_CourseID" DataSourceID="SqlDataSource1"
DefaultMode="Edit" Width="319px">
<EditItemTemplate>
<table cellpadding="0" cellspacing="0" class="table" width="300">
<tr>
<td class="tdHead" colspan="2">
<p class="MsoNormal">
<span>课程信息修改</span></p>
</td>
</tr>
<tr>
<td style="width: 100px" height="25">
课程编号:</td>
<td style="width: 100px" height="25">
<asp:Label ID="TQ_CourseIDLabel1" runat="server" Font-Bold="True" ForeColor="Red"
Text='<%# Eval("TQ_CourseID") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px" class="tdAlter">
课程名称:</td>
<td style="width: 100px" class="tdAlter">
<asp:TextBox ID="TQ_CourseNameTextBox" runat="server" Text='<%# Bind("TQ_CourseName") %>'></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" height="5">
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="更新"></asp:LinkButton> <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="取消"></asp:LinkButton>
<asp:HyperLink ID="hlkBack" runat="server" NavigateUrl="~/MCourse.aspx">返回</asp:HyperLink></td>
</tr>
</table>
</EditItemTemplate>
<InsertItemTemplate>
<br />
<table>
<tr>
<td style="width: 100px">
课程编号:</td>
<td style="width: 100px">
<asp:Label ID="Label1" runat="server" Text="由系统自动生成"></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
课程名称:</td>
<td style="width: 100px">
<asp:TextBox ID="TQ_CourseNameTextBox" runat="server" Text='<%# Bind("TQ_CourseName") %>'></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
</table>
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="插入"></asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="取消"></asp:LinkButton>
</InsertItemTemplate>
<ItemTemplate>
<br />
<table width="300">
<tr>
<td style="width: 100px">
课程编号:</td>
<td align="left">
<asp:Label ID="TQ_CourseIDLabel" runat="server" Text='<%# Eval("TQ_CourseID") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
课程名称:</td>
<td align="left">
<asp:Label ID="TQ_CourseNameLabel" runat="server" Text='<%# Bind("TQ_CourseName") %>'></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td align="left">
</td>
</tr>
</table>
<br />
</ItemTemplate>
</asp:FormView>
</td>
</tr>
</table>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:QuestionManagerConnectionString %>"
SelectCommand="SELECT [TQ_CourseID], [TQ_CourseName] FROM [TQ_Courses] WHERE ([TQ_CourseID] = @TQ_CourseID)"
DeleteCommand="DELETE FROM [TQ_Courses] WHERE [TQ_CourseID] = @TQ_CourseID"
InsertCommand="INSERT INTO [TQ_Courses] ([TQ_CourseName]) VALUES (@TQ_CourseName)"
UpdateCommand="UPDATE [TQ_Courses] SET [TQ_CourseName] = @TQ_CourseName WHERE [TQ_CourseID] = @TQ_CourseID">
<SelectParameters>
<asp:QueryStringParameter Name="TQ_CourseID" QueryStringField="id" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="TQ_CourseID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="TQ_CourseName" Type="String" />
<asp:Parameter Name="TQ_CourseID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="TQ_CourseName" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -