1.比较日期的早晚直接ToString()后用">","<","="比较即可!
2.看DataSet是否为空,应该为ds.Tables[0].Rows.Count>0则代表不为空
3.何为强类型,弱类型?forexample:javascript 里var a;a='str';a=0;不需要明确变量的类型,即为弱类型;而在C#里,必须定义变量的类型 int i=0,string str="str";即为强类型。
4.
代码
<asp:TemplateField HeaderText="性别">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Sex").ToString()=="0"?"男":"女" %>'></asp:Label>
</ItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Sex").ToString()=="0"?"男":"女" %>'></asp:Label>
</ItemTemplate>
5.
清空缓存
Response.Buffer = true;
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache");
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache");
6.
var code = document.getElementById('<%=txtProCode.ClientID %>').value;