asp.net c# request³£ÓÃ
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace pub.mo
{
public class request
{
private request() { }
/// <summary>
/// »ñÈ¡session
/// </summary>
/// <param name="_session_name"></param>
/// <returns></returns>
public static string session(string _session_name)
{
object obj = HttpContext.Current.Session[_session_name];
return obj == null ? config.empty : obj.ToString();
}
/// <summary>
/// µÃµ½Request.QueryString
/// </summary>
/// <param name="_str"></param>
/// <returns></returns>
public static string querystring(string _str)
{
string s = HttpContext.Current.Request.QueryString[_str];
return s == null ? config.empty : s;
}
/// <summary>
/// µÃµ½Request.Form
/// </summary>
/// <param name="_str"></param>
/// <returns></returns>
public static string form(string _str)
{
string s = HttpContext.Current.Request.Form[_str];
return s == null ? config.empty : s;
}
/// <summary>
/// µÃµ½Request.Cookies
/// </summary>
/// <param name="_str"></param>
/// <returns></returns>
public static string cookies(string _str)
{
HttpCookie hc = HttpContext.Current.Request.Cookies[_str];
return hc == null ? config.empty : hc.Value;
}
/// <summary>
/// »ñµÃµ±Ç°Ò³ÃæµÄÃû³Æ
/// </summary>
/// <returns>µ±Ç°Ò³ÃæµÄÃû³Æ</returns>
public static string page_name()
{
string[] urlArr = HttpContext.Current.Request.U
Ïà¹ØÎĵµ£º
Abs(number) È¡µÃÊýÖµµÄ¾ø¶ÔÖµ¡£
Asc(String) È¡µÃ×Ö·û´®±í´ïʽµÄµÚÒ»¸ö×Ö·ûASCII Âë¡£
Atn(number) È¡µÃÒ»¸ö½Ç¶ÈµÄ·´ÕýÇÐÖµ¡£
CallByName (object, procname, usecalltype,[args()]) Ö´ÐÐÒ»¸ö¶ÔÏóµÄ·½·¨¡¢É趨»ò´«»Ø¶ÔÏóµÄÊôÐÔ¡£
CBool(expression) ת»»±í´ïʽΪBoolean ÐÍ̬¡£
CByte(expression) ת»»±í´ïʽΠ......
ÔÚÄãµÄPage_LoadÖÐÌí¼ÓÕâÑùµÄ´úÂë:
Page.Response.Clear();
bool success = ResponseFile(Page.Request, Page.Response, "Ä¿µÄÎļþÃû³Æ", @"Ô´Îļþ·¾¶", 1024000);
if (!success)
Response.Write("ÏÂÔØÎļþ³ö´í£¡");
Page.Response.End();
ÎļþÏÂÔغ¯Êý´úÂëΪ:
public static bo ......
ÔÚ±¾ÆªÎļþÖУ¬ÎÒÃǽ«ÌÖÂÛ±à³ÌÈËÔ±ÔÚʹÓÃASP.NET¿ª·¢Ó¦ÓóÌÐòʱÐèҪעÒâµÄ10¸ö¼¼ÇÉ£¬ÕâЩ¼¼ÇÉÉæ¼°´ÓȱʡµÄ¿Ø¼þ¡¢±íµ¥ÃûµÄ¸Ä±äµ½StringBuilderÀàµÄʹÓã¬ÓÐÖúÓÚ±à³ÌÈËÔ±Äܹ»¾¡¿ìµØÊÊÓ¦.NET»·¾³¡£ 1¡¢ÔÚʹÓÃVisual Studio .NETʱ£¬³ýÖ±½Ó»ò·ÇÒýÓõĶÔÏóÍ⣬²»ÒªÊ¹ÓÃȱʡµÄÃû×Ö¡£
.NET´øÀ´µÄºÃ´¦Ö®Ò»ÊÇËùÓеÄÔ´´úÂëºÍÅäÖÃÎ ......
ÀûÓÃ Page.RegisterStartupScript("", "<script language='javascript'> results();</script>");
»òÕßÊÇ Page.RegisterClient ......
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>";
/// <summa ......