随笔分类 - .NET
摘要:plsql与.net异常处理~procedure XX_PP() isbegin ...exception when e_error then raise_application_error(-20001, "e_error exception: " || sqlerrm); end; try{ ...}catch(exception e){ Respone.Write(e.message); }
阅读全文
摘要:最近做网站时,套用了一个ext框架,使用Response.Redirect或javascript都无法弹出新窗口。最后使用如下:ClientScript.RegisterStartupScript(this.GetType(), "onclick", "window.open('" + str_url + "','打印','location=no,resizable=yes,scrollbars=yes')", true);
阅读全文
摘要:目的:在aspx页面的一个文本框失去焦点时,触发一个查询TABLE的动作。1. page_load 添加 txtInternal.Attributes["onfocus"] = "MyJsFunc()";2. 页面javascript添加:<script ...>... function MyJsFunc() { var txt = document.getElementById("txtLotID").value; PageMethods.MyMethod(txt,OnSuccess); } function OnSuc
阅读全文
摘要:在VB中有ASC和Chr系统定义的函数可用,在C#中是没有的...这次是因为条码需要增加一位校验码,需要使用到这个转换函数。字符转ASCII码:public static int Asc(string character){if (character.Length == 1){System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();int intAsciiCode = (int)asciiEncoding.GetBytes(character)[0];return (intAsciiCode);}els
阅读全文