When writing a class file, you don't want to introduce the namespace unless you need some methods. Well, you cannot figure it out. record it. Multiple records are used.
Note the following to add a project reference system. Web. dll
Use using system. configuration; these require using system. configuration; namespaces
Public void break (string strinfo)
{
System. web. httpcontext. current. response. write ("<SCRIPT> alert (\ '" + strinfo + "\'); history. back (); </SCRIPT> ");
System. Web. httpcontext. Current. response. End ();
}
Userjudge2 = system. Text. encoding. Default. getbytecount (STR );
Stringbuilder sb = new stringbuilder ();
SB. append ("××× )");
Response
System. web. httpcontext. current. response. write ("<SCRIPT> alert (\ '" + errinfo + "\'); history. back (); <"+"/SCRIPT> ");
Server. mappath
System. Web. httpcontext. Current. server. mappath (
Configurationsettings. deleettings ["ac_dbpath"]);
Session
System. Web. httpcontext. Current. session ["admcheckcode"]
MD5
System. Web. Security. formsauthentication. hashpasswordforstoringinconfigfile (STR, "MD5 ")
Configurationsettings
System. configuration. configurationsettings. receivettings ["mailfrom"];
Servervariables (hot, I found it for half a day.)
System. Collections. Specialized. namevaluecollection servervariables = system. Web. httpcontext. Current. Request. servervariables;
Response. Write (servervariables ["http_referer"]);
Htmlencode
System. Web. httputility. htmlencode (MSG)
Pageddatasource
Private system. Web. UI. webcontrols. pageddatasource _ objpds;
RegEx Regular Expression
System. Text. regularexpressions RegEx
Request. currentexecutionfilepath: Obtain the virtual path of the current request.
Streamreader sr = file. opentext (
System. Web. httpcontext. Current. server. mappath ("resource/templet "));