AJax技术

asp.net ajax 技巧4(2)

字号+ 作者:H5之家 来源:H5之家 2015-11-18 13:51 我要评论( )

HeaderStyle HorizontalAlign="Right"/HeaderStyle ItemTemplate asp:Label runat="server" Text='%# Bind("性别") %'/asp:Label /ItemTemplate /asp:TemplateField asp:TemplateField SortExpression="地址" Heade

<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Bind("性别") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField SortExpression="地址" HeaderText="地址:"><EditItemTemplate>
<asp:TextBox runat="server" Text='<%# Bind("地址") %>'></asp:TextBox>

</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox runat="server" Text='<%# Bind("地址") %>'></asp:TextBox>

</InsertItemTemplate>

<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Bind("地址") %>'></asp:Label>

</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="邮政编码" SortExpression="邮政编码" HeaderText="邮政编码:">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
</asp:BoundField>
<asp:BoundField HtmlEncode="False" DataFormatString="{0:d}" DataField="出生日期" SortExpression="出生日期" HeaderText="出生日期:" ApplyFormatInEditMode="True">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
</asp:BoundField>
<asp:TemplateField SortExpression="婚姻状况" HeaderText="婚姻状况:"><EditItemTemplate>
<asp:DropDownList runat="server" SelectedValue='<%# Bind("婚姻状况") %>'>
<asp:ListItem>已婚</asp:ListItem>
<asp:ListItem>未婚</asp:ListItem>
</asp:DropDownList>

</EditItemTemplate>
<InsertItemTemplate>
<asp:DropDownList runat="server" SelectedValue='<%# Bind("婚姻状况") %>'>
<asp:ListItem>已婚</asp:ListItem>
<asp:ListItem>未婚</asp:ListItem>
</asp:DropDownList>

</InsertItemTemplate>

<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Bind("婚姻状况") %>'></asp:Label>

</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HtmlEncode="False" DataFormatString="{0:d}" DataField="到职日期" SortExpression="到职日期" HeaderText="到职日期:" ApplyFormatInEditMode="True">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
</asp:BoundField>
<asp:BoundField DataField="起薪" SortExpression="起薪" HeaderText="起薪:">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
</asp:BoundField>
<asp:BoundField DataField="目前薪资" SortExpression="目前薪资" HeaderText="目前薪资:">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
</asp:BoundField>
<asp:BoundField HtmlEncode="False" DataFormatString="{0:d}" DataField="加薪日期" SortExpression="加薪日期" HeaderText="加薪日期:" ApplyFormatInEditMode="True">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
</asp:BoundField>
<asp:TemplateField SortExpression="部门" HeaderText="部门:"><EditItemTemplate>
<asp:DropDownList runat="server" DataSourceID="DepartmentList"
DataTextField="部门" DataValueField="部门" SelectedValue='<%# Bind("部门") %>'>
</asp:DropDownList><asp:SqlDataSource runat="server" ConnectionString="<%$ ConnectionStrings:chtNorthwind %>"
SelectCommand="SELECT DISTINCT [部门] FROM [章立民工作室]"></asp:SqlDataSource>

</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox runat="server" Text='<%# Bind("部门") %>'></asp:TextBox>
</InsertItemTemplate>

<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Bind("部门") %>'></asp:Label>

</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowInsertButton="True" ShowEditButton="True">
<ItemStyle ForeColor="#C00000" Font-Bold="True"></ItemStyle>
</asp:CommandField>
</Fields>

<FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True"></FieldHeaderStyle>

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • PHP教程,ASP教程,前端开发,h5cn教程,电脑教程

    PHP教程,ASP教程,前端开发,h5cn教程,电脑教程

    2016-02-09 15:01

  • asp.net ajax 客户端框架未能加载

    asp.net ajax 客户端框架未能加载

    2016-01-25 08:01

  • asp.net开发常用技巧收集(2)

    asp.net开发常用技巧收集(2)

    2016-01-23 16:01

  • 技巧和诀窍:在不用UpdatePanel的情形下可与ASP.NET AJAX 使用的

    技巧和诀窍:在不用UpdatePanel的情形下可与ASP.NET AJAX 使用的

    2016-01-23 16:00

网友点评
/