zoukankan      html  css  js  c++  java
  • Tips

    Window

    protected void Mess(string Mes)
        {
            this.ClientScript.RegisterStartupScript(GetType(), "a""alert('" + Mes + "');"true);
        }

    VS向SQL中寫入DateTime:

    SqlParameter[] sqlParaInsert = new SqlParameter[] { 
                new SqlParameter("@empNo", txt_Employee_No.Text.Trim()),
                new SqlParameter("@password",FormsAuthentication.HashPasswordForStoringInConfigFile(LblPassword.Text.Trim(), "md5").ToString()), 
                new SqlParameter("@Hours",DropDownList2.SelectedValue.ToString()),
                new SqlParameter("@flyerID",DropDownList1.SelectedValue.ToString()),
                new SqlParameter("@startTime",DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")),
                new SqlParameter("@endTime",DateTime.Now.AddHours(1).ToString("yyyy-MM-dd HH:mm:ss"))
                };
     
     

     可以向SQL中定义的Int 类型的数据 传入Sting类型的数据,  getdate()自动获得服务器的时间,标识列:SQE

    string HostName = System.Net.Dns.GetHostName();
    string HostName2 = System.Net.Dns.GetHostEntry(Request.UserHostName).HostName;
     Response.Write(HostName);
     Response.Write(HostName2);

     一个字符串在另一个字符串中出现的位置

    string r = ADPath.Replace("OU=", "");
    int num = (ADPath.Length - r.Length) / 3;

    相同字符截取字符串

    using System.Text.RegularExpressions;
    string str="aaajsbbbjsccc";
    string[] sArray=Regex.Split(str,"js",RegexOptions.IgnoreCase);
    foreach (string i in sArray) Response.Write(i.ToString() + "<br>");

  • 相关阅读:
    web安全-接入层注入
    web安全-密码安全
    web安全-传输安全
    Jenkins-安装
    RobotFramework-关键字
    RobotFramework-调用.py文件
    RobotFramework-登录
    SQL-行转列(PIVOT)实例1
    SQL-AdventureWorks样例数据库
    TestDescription文档描述测试过程
  • 原文地址:https://www.cnblogs.com/hishanghai/p/2527933.html
Copyright © 2011-2022 走看看