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

asp.net弹出确定或警告

在没有<asp:UpdatePanel ID="up" runat="server"> <ContentTemplate>无刷新环境中:
      Response.Write("<script>alert('恭喜您,已成功加入到您的人才库!');</script>");
在有<asp:UpdatePanel ID="up" runat="server"> <ContentTemplate>无刷新环境中:
       ScriptManager.RegisterStartupScript(this.up, this.GetType(), "msgl", "alert('您还没有登录,请先登录!');", true);
点击按钮时弹出窗口有:
/// <summary>
        /// 在ASP.NET AJAX环境中弹出一个对话框
        /// </summary>
        /// <param name="button"></param>
        /// <param name="message"></param>
        public static void ShowAjaxDialog(Button button, string message)
        {
            ScriptManager.RegisterClientScriptBlock(button, typeof(Button), button.ClientID,
                "alert(\"" + message + "\");", true);
        }
       
        /// <summary>
        /// 说明:MessageBox用来在客户端弹出对话框。
        /// 参数:TxtMessage 对话框中显示的内容。
        /// </summary>
        public string MessageBox(string TxtMessage)
        {
            string str;
            str = "<script language=javascript>alert('" + TxtMess


相关文档:

ASP.NET Cookie使用


1.什么是cookie?
cookie 是一小段文本信息,伴随用户请求,在web服务器和浏览器之间传递。用户每次访问站点的时候,
web应用程序都可以读取cookie包含的信息。
假设在用户请求您的网站的某个页面时,您的应用程序不仅是返回请求的页面。同时也返回一个包含日期
和时间的cookie。用户的浏览器在获得页面的同时也获得 ......

ASP.Net生成验证码

using System;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public partial class images_code : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string chkCode = string.Empty;
//颜色列表,用于验证码、噪线、噪点
Color[] col ......

asp.net(C#)字符串加密

asp.net(C#)字符串加密
2010-03-12 09:59
using System;   
using System.Collections.Generic;   
using System.Text;   
using System.Security.Cryptography;//Cryptography密码术   
namespace DAL   
{   
......

ASP.NET连接SQL和ACCESS的方法

SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath 为根目录
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号