随笔分类 - asp.net
摘要:在html里绑定数据,如果绑定的数据需要判断,如果有两个条件,可以使用三元运算符:例如:A=="5" ? "B" : "C"如果一个Lable绑定数据:'>,如果需要判断可以这样写:'>,当条件多于两个时,可用嵌套运算:'>,依次类推。
阅读全文
摘要:<asp:Repeater ID="Repeater1" runat="server"><ItemTemplate><asp:Panel ID="p1" runat="server"><a href='a.aspx?Id=<%# Eval("id") %>'>编辑</a></asp:Panel></ItemTemplate></asp:Repeater>protected
阅读全文
摘要:<connectionStrings> <add name="ConnectionString"connectionString="server=.;database=bolgs;uid=sa;pwd=1"/> </connectionStrings>
阅读全文
摘要:#region 用md5加密字符串后返回 public string Md5(string s) { //用md5加密s,并返回 byte[] result = Encoding.Default.GetBytes(s); MD5 md5 = new MD5CryptoServiceProvider(); byte[] output = md5.ComputeHash(result); s = BitConverter.ToString(output).Replace("-", ""); return...
阅读全文

浙公网安备 33010602011771号