易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net c# js服务器端常用

using System;
using System.Web;
namespace pub.mo
{
public class js
{
private js() { }
private static string scr_j1 = "<mce:script type=\"text/javascript\"><!--
";
private static string scr_j2 = "
// --></mce:script>";
/// <summary>
/// 输入js并停止运行
/// </summary>
/// <param name="str"></param>
public static void write_js(string str)
{
HttpContext.Current.Response.Write(config.j1);
HttpContext.Current.Response.Write(scr_j1);
HttpContext.Current.Response.Write(str);
HttpContext.Current.Response.Write(scr_j2);
HttpContext.Current.Response.Write(config.j2);
HttpContext.Current.Response.End();
}
/// <summary>
/// 输入js,无Response.End()
/// </summary>
/// <param name="str"></param>
public static void write_js1(string str)
{
HttpContext.Current.Response.Write(config.j1);
HttpContext.Current.Response.Write(scr_j1);
HttpContext.Current.Response.Write(str);
HttpContext.Current.Response.Write(scr_j2);
HttpContext.Current.Response.Write(config.j2);
}
/// <summary>
/// 弹出消息框 点确定后history.back();
/// </summary>
/// <param name="str"></param>
public static void alert(string str)
{
HttpContext.Current.Response.Write(config.j1);
HttpContext.Current.Response.Write(scr_j1);
HttpContext.Current.Response.Write("alert('" + str + "');history.back();");
HttpContext.Current.Response.Write(scr_j2);
HttpContext.Current.Response.Write(config.j2);
HttpContext.Current.Response.End();
}
/// <summary>
///
/// </sum


相关文档:

asp.net页面生命周期也称执行顺序

1.对象初始化(OnInit方法)
    页面中的控件(包括页面本身)都是在它们最初的FORM中被首次初始化的。通过在ASPX页面的后台代码文件的构造器中声明你的对象,页面将知道对象的类型,并知道需要创建多少个这样的对象。一旦你在构造器中声明了你的控件,你就可以在它的任何子类,方法,事件或者属性中访 ......

C# 连接Oracle数据库


C#连接Oracle数据库字符串
http://developer.51cto.com
 2009-08-20 17:55  佚名  百度空间  我要评论(
0
)
C#连接Oracle数据库以及C#连接Oracle数据库字符串等内容将在本文中展现,希望本文能对大家了解C#连接数据库有所帮助。
C#连接Oracle数据库字符串(查询数据)
using
 Syst ......

c#中调用JavaScript脚本函数的一种方法

利用            Page.RegisterStartupScript("", "<script language='javascript'> results();</script>");    
      或者是         Page.RegisterClient ......

C# 生成XML时的特殊字符出现异常处理

生成端处理
将要写入的值的前后写上如:"<![CDATA[" + string+ "]]>";
XmlNode xnformchild = doc.CreateNode(XmlNodeType.Element, dc.ColumnName.ToUpper(), "");
try
{
xnformchild.InnerXml = drform[dc.ColumnName].ToString( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号