解决方法是用Input取代label控件,详细见下面:
<input id="lblBeginTime" runat="server" type="text" tabindex="-1" readonly="readonly" style="background-color: Transparent; text-align: Left; border-style: none; width: 100px;" value='<%# DataBinder.Eval(Container.DataItem, "BeginTime") %>' />
方法步骤:
1、设置样式style="background-color: Transparent; text-align: Left; border-style: none; width: 100px;"
2、设置readonly="readonly"