下面展示一些 内联代码片
。
// An highlighted block
var foo = 'bar';
<asp:TemplateField HeaderText="操作">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text="完成任务" CommandName="_Update" CommandArgument='<%#Eval("TaskID") %>'
Visible='<%#Convert.ToInt32(Eval("TaskState"))!=2 %>'
/>
<asp:Button ID="Button2" runat="server" Text="删除" CommandName="_Delete" CommandArgument='<%#Eval("TaskID") %>'
OnClientClick="return confirm('确定要删除吗?')"
/>
</ItemTemplate>
</asp:TemplateField>