怎样给DetailsView控件中的一个字段赋值?
DetailsView控件的代码如下, 我想给 "序号 "字段赋一个值,例如 "00001 ",
请问应该写在哪个事件里面? 具体代码怎么写?
我尝试了写在好几个事件里面,都不行,求助!!
<asp:DetailsView ID= "DetailsView1 " runat= "server " AutoGenerateRows= "False " DataKeyNames= "Id "
DataSourceID= "AccessDataSource1 " PageIndex= "1 " Height= "92px " Width= "293px "
AutoGenerateEditButton= "True " AutoGenerateInsertButton= "True " HorizontalAlign= "Left " OnDataBound= "DetailsView1_DataBound " >
<Fields>
<asp:TemplateField HeaderText= "序号: " SortExpression= "Id ">
<EditItemTemplate>
<asp:Label ID= "Label1 " runat= "server " Text= ' <%# bind( "Id ") %> '> </asp:Label>
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID= "TextBox1 " runat= "server " Text= ' <%# Bind( "Id ") %> '> </asp:TextBox>
</InsertItemTemplate>
<HeaderStyle Font-Bold= "True " HorizontalAlign= "Right " Width= "100px " />
<ItemTemplate>
<asp:Label ID= "Label1 " runat= "server " Text= ' <%# Bind( "Id ") %> '> </asp:Label>
</ItemTemplate>
<