摘要: 最近做网站时,套用了一个ext框架,使用Response.Redirect或javascript都无法弹出新窗口。最后使用如下:ClientScript.RegisterStartupScript(this.GetType(), "onclick", "window.open('" + str_url + "','打印','location=no,resizable=yes,scrollbars=yes')", true); 阅读全文
posted @ 2011-08-12 16:11 郭振斌 阅读(1166) 评论(0) 推荐(0) 编辑
摘要: 目的:在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 阅读全文
posted @ 2011-08-12 15:40 郭振斌 阅读(861) 评论(0) 推荐(0) 编辑
摘要: 在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 阅读全文
posted @ 2011-08-12 09:21 郭振斌 阅读(1659) 评论(0) 推荐(0) 编辑