ASP.net 仿QQ弹出窗口
ASP.net 仿QQ弹出窗口
〔转〕http://hi.baidu.com/liyukun8203/blog/item/d9244dfcdb78e388b901a019.html
最近在做内部管理,需要用到这个东西来提醒,所以就把它做成一个类,直接调用,满方便的.贴一下代码,大家看一下
Code
1 using System;
2 using System.Web;
3 using System.Collections.Generic;
4 using System.Text;
5
6 /****************************************
7 * 作者:wenjl
8 * 功能:使用该类,可以实现右下角的弹出界面。
9 * 日期:2008-10-26
10 * 版本:0.1
11 * **************************************/
12 namespace PopupMessage
13 {
14 /// <summary>
15 /// 使用该类,可以实现右下角的弹出界面。
16 /// </summary>
17 public class PopupMessage
18 {
19 private StringBuilder m_Script;
20
21 #region PopupMessage构造函数。
22 /// <summary>
23 /// 构告出弹出界面的前台脚本。
24 /// </summary>
25 public PopupMessage()
26 {
27 m_Script = new StringBuilder();
28 #region Script
29 m_Script.Append("<SCRIPT language=\"JavaScript\" type=\"text/javascript\"> \n ");
30 // m_Script.Append("<!-- \n ");
31 m_Script.Append("function CLASS_MSN_MESSAGE(id,width,height,caption,message,target,action){ \n ");
32 &nb
相关文档:
方法1:
比如建立一个名为cnlive,值为"123"的cookie
HttpCookie cookie = new HttpCookie["cnlive"];
cookie.Value = "123";
Response.AppendCookie(cookie);
取刚才写入的Cookie值:
HttpCookie cookie = Request.Cookies["cnlive"];
cookieValue = cookie.Value;
在一个Cookie中储存多个信息:
HttpCookie cookie ......
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" & ......
1、DateTime 数字型
System.DateTime currentTime=new System.DateTime();
1.1 取当前年月日时分秒
currentTime=System.DateTime.Now;
1.2 取当前年
int 年=currentTime.Year;
1.3 取当前月 &n ......
客户端传送数据到服务器端有三种方法:
1.form
2.querystring
3.cookie
利用这些方式取得的数据在服务器端都是字典集合,如果要精确取到某个集合的值,则直接使用对应的集合的名称,三种方式对应的集合如下:
1.form:request.form
2.querystring:request.querystring
3.cookie:request.cookie
利用request.p ......
ASP.NET打开新窗口方法一:
Response.Write(" <script language=\"javascript\">window.open('aaa.aspx','新窗口,\"toolbar=yes,location=no,directories=yes,status=yes,menubar=yes,resizable=yes,scrollbars=yes\"); </script>");
这种方式代码每次是生成在页面最顶端
ASP.NET打开新窗口方法二:
stri ......