CINXE.COM

ASP.NET/Request - 维基教科书,自由的教学读本

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="zh" dir="ltr"> <head> <meta charset="UTF-8"> <title>ASP.NET/Request - 维基教科书,自由的教学读本</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )zhwikibooksmwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRequestId":"7ea9ce5e-4050-491e-91ec-05f154ec846f","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"ASP.NET/Request","wgTitle":"ASP.NET/Request","wgCurRevisionId":141729,"wgRevisionId":141729,"wgArticleId":30960,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"zh","wgPageContentLanguage":"zh","wgPageContentModel":"wikitext","wgRelevantPageName":"ASP.NET/Request","wgRelevantArticleId":30960,"wgUserVariant":"zh","wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikibooks","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"zh","pageLanguageDir":"ltr","pageVariantFallbacks":[ "zh-hans","zh-hant","zh-cn","zh-tw","zh-hk","zh-sg","zh-mo","zh-my"]},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init" :"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.AdvancedSiteNotices","ext.gadget.noteTA","ext.gadget.internalLinkHelper-altcolor","ext.gadget.IRC","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.checkUser.clientHints"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=zh&amp;modules=ext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=zh&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=zh&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="ASP.NET/Request - 维基教科书,自由的教学读本"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//zh.m.wikibooks.org/wiki/ASP.NET/Request"> <link rel="alternate" type="application/x-wiki" title="编辑" href="/w/index.php?title=ASP.NET/Request&amp;action=edit"> <link rel="icon" href="/static/favicon/wikibooks.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikibooks (zh)"> <link rel="EditURI" type="application/rsd+xml" href="//zh.wikibooks.org/w/api.php?action=rsd"> <link rel="canonical" href="https://zh.wikibooks.org/wiki/ASP.NET/Request"> <link rel="alternate" hreflang="zh" href="https://zh.wikibooks.org/wiki/ASP.NET/Request"> <link rel="alternate" hreflang="zh-Hans" href="https://zh.wikibooks.org/zh-hans/ASP.NET/Request"> <link rel="alternate" hreflang="zh-Hans-CN" href="https://zh.wikibooks.org/zh-cn/ASP.NET/Request"> <link rel="alternate" hreflang="zh-Hans-SG" href="https://zh.wikibooks.org/zh-sg/ASP.NET/Request"> <link rel="alternate" hreflang="zh-Hant" href="https://zh.wikibooks.org/zh-hant/ASP.NET/Request"> <link rel="alternate" hreflang="zh-Hant-HK" href="https://zh.wikibooks.org/zh-hk/ASP.NET/Request"> <link rel="alternate" hreflang="zh-Hant-TW" href="https://zh.wikibooks.org/zh-tw/ASP.NET/Request"> <link rel="alternate" hreflang="x-default" href="https://zh.wikibooks.org/wiki/ASP.NET/Request"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh"> <link rel="alternate" type="application/atom+xml" title="Wikibooks的Atom feed" href="/w/index.php?title=Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-ASP_NET_Request rootpage-ASP_NET skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">跳转到内容</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="站点"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="主菜单" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">主菜单</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">主菜单</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">隐藏</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> 导航 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpagedisplay" class="mw-list-item"><a href="/wiki/Wikibooks:%E9%A6%96%E9%A1%B5"><span>首页</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikibooks:%E7%A4%BE%E5%8C%BA%E4%B8%BB%E9%A1%B5" title="关于本计划,您可做的事,何处找到您所需"><span>社群首页</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9" title="本wiki的最近更改列表[r]" accesskey="r"><span>最近更改</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:%E9%9A%8F%E6%9C%BA%E9%A1%B5%E9%9D%A2" title="随机加载页面[x]" accesskey="x"><span>随机页面</span></a></li><li id="n-wikilibrary" class="mw-list-item"><a href="/wiki/Subject:%E7%B4%A2%E5%BC%95"><span>图书馆</span></a></li><li id="n-wikijunior" class="mw-list-item"><a href="/wiki/Wikijunior:%E7%B6%AD%E5%9F%BA%E5%85%92%E7%AB%A5"><span>维基儿童</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikibooks:%E4%B8%8A%E4%BC%A0"><span>上传文件</span></a></li> </ul> </div> </div> <div id="p-help" class="vector-menu mw-portlet mw-portlet-help" > <div class="vector-menu-heading"> 帮助 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:%E7%9B%AE%E5%BD%95" title="查找帮助的地方"><span>帮助</span></a></li><li id="n-villagepump" class="mw-list-item"><a href="/wiki/Wikibooks:%E4%BA%92%E5%8A%A9%E5%AE%A2%E6%A3%A7"><span>互助客栈</span></a></li><li id="n-policy" class="mw-list-item"><a href="/wiki/Wikibooks:%E6%96%B9%E9%87%9D%E8%88%87%E6%8C%87%E5%BC%95"><span>方针与指引</span></a></li><li id="n-conversion" class="mw-list-item"><a href="/wiki/Wikibooks:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2%E8%AF%B7%E6%B1%82%E6%88%96%E5%80%99%E9%80%89"><span>字词转换</span></a></li><li id="n-allpages" class="mw-list-item"><a href="/wiki/Special:%E6%89%80%E6%9C%89%E9%A1%B5%E9%9D%A2"><span>所有页面</span></a></li><li id="n-IRC" class="mw-list-item"><a href="/wiki/Wikibooks:IRC%E8%81%8A%E5%A4%A9%E9%A0%BB%E9%81%93"><span>IRC即時聊天</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Wikibooks:%E8%81%94%E7%BB%9C%E6%88%91%E4%BB%AC"><span>联络我们</span></a></li><li id="n-about" class="mw-list-item"><a href="/wiki/Wikibooks:%E5%85%B3%E4%BA%8E"><span>关于维基教科书</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Wikibooks:%E9%A6%96%E9%A1%B5" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikibooks.svg" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="维基教科书" src="/static/images/mobile/copyright/wikibooks-wordmark-zh.svg" style="width: 7.5em; height: 1.375em;"> <img class="mw-logo-tagline" alt="" src="/static/images/mobile/copyright/wikibooks-tagline-zh.svg" width="120" height="12" style="width: 7.5em; height: 0.75em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:%E6%90%9C%E7%B4%A2" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="搜索Wikibooks内容[f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>搜索</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="搜索维基教科书" aria-label="搜索维基教科书" autocapitalize="sentences" title="搜索Wikibooks内容[f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:搜索"> </div> <button class="cdx-button cdx-search-input__end-button">搜索</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="个人工具"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="外观"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="更改页面字体大小、宽度和颜色的外观" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="外观" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">外观</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_zh.wikibooks.org&amp;uselang=zh" class=""><span>资助我们</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&amp;returnto=ASP.NET%2FRequest" title="我们推荐您创建账号并登录,但这不是强制性的" class=""><span>创建账号</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&amp;returnto=ASP.NET%2FRequest" title="我们推荐您登录,但这不是强制性的[o]" accesskey="o" class=""><span>登录</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="更多选项" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="个人工具" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">个人工具</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="用户菜单" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_zh.wikibooks.org&amp;uselang=zh"><span>资助我们</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&amp;returnto=ASP.NET%2FRequest" title="我们推荐您创建账号并登录,但这不是强制性的"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>创建账号</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&amp;returnto=ASP.NET%2FRequest" title="我们推荐您登录,但这不是强制性的[o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>登录</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> 未登录编辑者的页面 <a href="/wiki/Help:%E6%96%B0%E6%89%8B%E5%85%A5%E9%97%A8" aria-label="了解有关编辑的更多信息"><span>了解详情</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:%E6%88%91%E7%9A%84%E8%B4%A1%E7%8C%AE" title="来自此IP地址的编辑列表[y]" accesskey="y"><span>贡献</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:%E6%88%91%E7%9A%84%E8%AE%A8%E8%AE%BA%E9%A1%B5" title="有关本IP地址编辑的讨论[n]" accesskey="n"><span>讨论</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="站点"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="目录" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">目录</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">隐藏</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">序言</div> </a> </li> <li id="toc-主要属性" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#主要属性"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>主要属性</span> </div> </a> <ul id="toc-主要属性-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-主要方法" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#主要方法"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>主要方法</span> </div> </a> <ul id="toc-主要方法-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-常用路径(path)获取方法" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#常用路径(path)获取方法"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>常用路径(path)获取方法</span> </div> </a> <ul id="toc-常用路径(path)获取方法-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-读取窗体变量四种方式" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#读取窗体变量四种方式"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>读取窗体变量四种方式</span> </div> </a> <button aria-controls="toc-读取窗体变量四种方式-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>开关读取窗体变量四种方式子章节</span> </button> <ul id="toc-读取窗体变量四种方式-sublist" class="vector-toc-list"> <li id="toc-使用Request.Form属性读取窗体变量" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#使用Request.Form属性读取窗体变量"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>使用Request.Form属性读取窗体变量</span> </div> </a> <ul id="toc-使用Request.Form属性读取窗体变量-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-使用Request.QueryString属性读取窗体变量" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#使用Request.QueryString属性读取窗体变量"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>使用Request.QueryString属性读取窗体变量</span> </div> </a> <ul id="toc-使用Request.QueryString属性读取窗体变量-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-使用Request.Params属性读取窗体变量" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#使用Request.Params属性读取窗体变量"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.3</span> <span>使用Request.Params属性读取窗体变量</span> </div> </a> <ul id="toc-使用Request.Params属性读取窗体变量-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-通过服务器控件的属性直接读取窗体变量" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#通过服务器控件的属性直接读取窗体变量"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4</span> <span>通过服务器控件的属性直接读取窗体变量</span> </div> </a> <ul id="toc-通过服务器控件的属性直接读取窗体变量-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Request.ServerVariables集合中获取到的相关信息" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Request.ServerVariables集合中获取到的相关信息"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Request.ServerVariables集合中获取到的相关信息</span> </div> </a> <ul id="toc-Request.ServerVariables集合中获取到的相关信息-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-http地址与本机地址的相互转化" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#http地址与本机地址的相互转化"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>http地址与本机地址的相互转化</span> </div> </a> <ul id="toc-http地址与本机地址的相互转化-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-取得客户端浏览器信息" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#取得客户端浏览器信息"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>取得客户端浏览器信息</span> </div> </a> <ul id="toc-取得客户端浏览器信息-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-读取客户端Cookie" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#读取客户端Cookie"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>读取客户端Cookie</span> </div> </a> <ul id="toc-读取客户端Cookie-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="目录" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="开关目录" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">开关目录</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">ASP.NET/Request</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="这篇条目只存在于此语言中。添加其他语言的条目" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">添加语言</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span><span class="wb-langlinks-add wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:NewItem?site=zhwikibooks&amp;page=ASP.NET%2FRequest" title="添加跨语言链接" class="wbc-editpage">添加链接</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="命名空间"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/ASP.NET/Request" title="查看内容页面[c]" accesskey="c"><span>页面</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Talk:ASP.NET/Request&amp;action=edit&amp;redlink=1" rel="discussion" class="new" title="有关内容页面的讨论(页面不存在)[t]" accesskey="t"><span>讨论</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown " > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="更改语言变体" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">不转换</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-varlang-0" class="selected ca-variants-zh mw-list-item"><a href="/zh/ASP.NET/Request" lang="zh" hreflang="zh"><span>不转换</span></a></li><li id="ca-varlang-1" class="ca-variants-zh-Hans mw-list-item"><a href="/zh-hans/ASP.NET/Request" lang="zh-Hans" hreflang="zh-Hans"><span>简体</span></a></li><li id="ca-varlang-2" class="ca-variants-zh-Hant mw-list-item"><a href="/zh-hant/ASP.NET/Request" lang="zh-Hant" hreflang="zh-Hant"><span>繁體</span></a></li><li id="ca-varlang-3" class="ca-variants-zh-Hans-CN mw-list-item"><a href="/zh-cn/ASP.NET/Request" lang="zh-Hans-CN" hreflang="zh-Hans-CN"><span>大陆简体</span></a></li><li id="ca-varlang-4" class="ca-variants-zh-Hant-HK mw-list-item"><a href="/zh-hk/ASP.NET/Request" lang="zh-Hant-HK" hreflang="zh-Hant-HK"><span>港澳繁體</span></a></li><li id="ca-varlang-5" class="ca-variants-zh-Hans-SG mw-list-item"><a href="/zh-sg/ASP.NET/Request" lang="zh-Hans-SG" hreflang="zh-Hans-SG"><span>马新简体</span></a></li><li id="ca-varlang-6" class="ca-variants-zh-Hant-TW mw-list-item"><a href="/zh-tw/ASP.NET/Request" lang="zh-Hant-TW" hreflang="zh-Hant-TW"><span>臺灣正體</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="查看"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/ASP.NET/Request"><span>阅读</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit" title="编辑该页面[e]" accesskey="e"><span>编辑</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=ASP.NET/Request&amp;action=history" title="该页面过去的修订[h]" accesskey="h"><span>查看历史</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="页面工具"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="工具" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">工具</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">工具</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">隐藏</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="更多选项" > <div class="vector-menu-heading"> 操作 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/ASP.NET/Request"><span>阅读</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit" title="编辑该页面[e]" accesskey="e"><span>编辑</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=ASP.NET/Request&amp;action=history"><span>查看历史</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> 常规 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:%E9%93%BE%E5%85%A5%E9%A1%B5%E9%9D%A2/ASP.NET/Request" title="所有链接至本页面的wiki页面列表[j]" accesskey="j"><span>链入页面</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:%E9%93%BE%E5%87%BA%E6%9B%B4%E6%94%B9/ASP.NET/Request" rel="nofollow" title="链自本页的页面的最近更改[k]" accesskey="k"><span>相关更改</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:%E7%89%B9%E6%AE%8A%E9%A1%B5%E9%9D%A2" title="所有特殊页面的列表[q]" accesskey="q"><span>特殊页面</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=ASP.NET/Request&amp;oldid=141729" title="此页面该修订版本的固定链接"><span>固定链接</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=ASP.NET/Request&amp;action=info" title="关于此页面的更多信息"><span>页面信息</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:%E5%BC%95%E7%94%A8%E6%AD%A4%E9%A1%B5%E9%9D%A2&amp;page=ASP.NET%2FRequest&amp;id=141729&amp;wpFormIdentifier=titleform" title="有关如何引用此页面的信息"><span>引用此页</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:URL%E7%BC%A9%E7%9F%AD%E7%A8%8B%E5%BA%8F&amp;url=https%3A%2F%2Fzh.wikibooks.org%2Fwiki%2FASP.NET%2FRequest"><span>获取短链接</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fzh.wikibooks.org%2Fwiki%2FASP.NET%2FRequest"><span>下载二维码</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> 打印/导出 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=ASP.NET%2FRequest&amp;action=show-download-screen"><span>下载为PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="本页面的可打印版本[p]" accesskey="p"><span>打印版本</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet" > <div class="vector-menu-heading"> 在其他项目中 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="页面工具"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="外观"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">外观</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">隐藏</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">维基教科书,自由的教学读本</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><div class="subpages">&lt; <bdi dir="ltr"><a href="/wiki/ASP.NET" title="ASP.NET">ASP.NET</a></bdi></div></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="zh" dir="ltr"><p>用户在client使用Web浏览器向Web应用程序发出请求时,会将client信息发给server。server收到一个HTTP请求,包括了全部查询字符串參数或表单參数、Cookie数据以及浏览器信息。在asp.net中执行时把这些请求信息封装成Request对象。 </p><p>Request对象最常用的是Form和QueryString集合。 </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="主要属性"><span id=".E4.B8.BB.E8.A6.81.E5.B1.9E.E6.80.A7"></span>主要属性</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=1" title="编辑章节:主要属性"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <table class="wikitable"> <caption>Request对象的主要属性 </caption> <tbody><tr> <th>属性名字</th> <th>解释 </th></tr> <tr> <td>ApplicationPath</td> <td>获取服务器上asp.net应用程序的虚拟应用程序根路径 </td></tr> <tr> <td>Browser</td> <td>获取有关正在请求的客户端的浏览器功能的信息 </td></tr> <tr> <td>ContentEncoding</td> <td>获取或设置实体主体的字符集。该属性值为表示客户端的字符集Encoding对象 </td></tr> <tr> <td>ContentLength</td> <td>指定客户端发送的内容长度,以字节为单位 </td></tr> <tr> <td>ContentType</td> <td>获取或设置传入请求的MIME内容类型 </td></tr> <tr> <td>Cookies</td> <td>获取客户端发送的Cookie集合 </td></tr> <tr> <td>CurrentExecutionFilePath</td> <td>获取当前请求的虚拟路径 </td></tr> <tr> <td>FilePath</td> <td>获取当前请求的虚拟路径 </td></tr> <tr> <td>Files</td> <td>获取客户端上载的文件集合 </td></tr> <tr> <td>Form</td> <td>获取窗体变量集合 </td></tr> <tr> <td>HttpMethod</td> <td>获取客户端使用的HTTP数据传输方法(如:get、post或head) </td></tr> <tr> <td>Item</td> <td>获取Cookies、Form、QueryString或ServerVariables集合中指定的对象 </td></tr> <tr> <td>Params</td> <td>获取Cookies、Form、QueryString或ServerVariables项的组合集合 </td></tr> <tr> <td>Path</td> <td>获取当前请求的虚拟路径 </td></tr> <tr> <td>PathInfo</td> <td>获取具有URL扩展名的资源的附加路径信息 </td></tr> <tr> <td>PhysicalApplicationPath</td> <td>获取当前正在执行的服务器应用程序的根目录的物理文件系统路径 </td></tr> <tr> <td>PhysicalPath</td> <td>获取与请求的URL相对应的物理文件路径 </td></tr> <tr> <td>QueryString</td> <td>获取HTTP查询字符串变量集合 </td></tr> <tr> <td>RequestType</td> <td>获取或设置客户端使用HTTP数据传输的方式(get或post) </td></tr> <tr> <td>ServerVariables</td> <td>获取Web服务器变量的集合 </td></tr> <tr> <td>TotalBytes</td> <td>获取当前输入流的字节数 </td></tr> <tr> <td>Url</td> <td>获取有关当前请求URL的信息 </td></tr> <tr> <td>UserHostAddress</td> <td>获取远程客户端的IP主机地址 </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="主要方法"><span id=".E4.B8.BB.E8.A6.81.E6.96.B9.E6.B3.95"></span>主要方法</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=2" title="编辑章节:主要方法"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>(1)MapPath(VirtualPath):将当前请求的URL中的虚拟路径virtualPath映射到服务器上的物理路径。参数virtualPath指定当前请求的虚拟路径,可以是绝对路径或相对路径。该方法的返回值为由virtualPath指定的服务器物理路径。 </p><p>(2)SaveAs (Filename,includeHeaders):将http请求保存到磁盘。参数filename指定物理驱动器路径,includeHeaders是一个布尔值,指定是否应将HTTP标头保存到磁盘。 </p> <div class="mw-heading mw-heading2"><h2 id="常用路径(path)获取方法"><span id=".E5.B8.B8.E7.94.A8.E8.B7.AF.E5.BE.84.28path.29.E8.8E.B7.E5.8F.96.E6.96.B9.E6.B3.95"></span>常用路径(path)获取方法</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=3" title="编辑章节:常用路径(path)获取方法"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>假设网址为http://localhost:1897/ News/Press/Content.aspx?id=1019 </p> <table class="wikitable"> <caption>标题文本 </caption> <tbody><tr> <th>跟 Browser Request 的网址相关的属性与方法</th> <th>输出(output)实例</th> <th>备注 </th></tr> <tr> <td>Request.ApplicationPath</td> <td>/</td> <td>指的是当前的application(应用程序)的目录 </td></tr> <tr> <td>Request.PhysicalPath</td> <td>D:\Projects\Solution\web\News\Press\Content.aspx</td> <td>磁盘驱动器代号:\父目录\子目录\Content.aspx </td></tr> <tr> <td>Request.PhysicalApplicationPath</td> <td>D:\Projects\Solution\web\</td> <td>磁盘驱动器代号:\父目录\子目录\ </td></tr> <tr> <td>Request.CurrentExecutionFilePath</td> <td>/News/Press/Content.aspx</td> <td> </td></tr> <tr> <td>Request.FilePath</td> <td>/News/Press/Content.aspx</td> <td>对应于iis的虚拟目录。 </td></tr> <tr> <td>Request.Path</td> <td>/News/Press/Content.aspx</td> <td>当前请求的虚拟路径。Path 是 FilePath 和 PathInfo 尾部的串联。*(见下面详细讲解) </td></tr> <tr> <td>Server.MapPath(string url)</td> <td>例http://www.example.com/1/index.html, 假设你的应用程序在c:/iis/MySite中,那么就是c:/iis/MySite/1/index.html</td> <td>将url映射为服务器上的物理路径 </td></tr> <tr> <td>Request.RawUrl</td> <td>/News/Press/Content.aspx?id=1019</td> <td> </td></tr> <tr> <td>Request.Url.AbsolutePath</td> <td>/News/Press /Content.aspx</td> <td> </td></tr> <tr> <td>Request.Url.AbsoluteUri</td> <td><a rel="nofollow" class="external free" href="http://localhost:1897/Content.aspx?id=1019">http://localhost:1897/Content.aspx?id=1019</a></td> <td> </td></tr> <tr> <td>Request.Url.LocalPath</td> <td>/News/Press//Content.aspx</td> <td> </td></tr> <tr> <td>Request.Url.PathAndQuery</td> <td>/News/Press//Content.aspx?id=1019&amp;uu=77</td> <td> </td></tr> <tr> <td>Request.Url.Scheme</td> <td>http</td> <td> </td></tr> <tr> <td>Request.Url.Host</td> <td>localhost</td> <td> </td></tr> <tr> <td>Request.Url.Port</td> <td>1987</td> <td> </td></tr> <tr> <td>Request.Url.Authority</td> <td>localhost:1897</td> <td> </td></tr> <tr> <td>Request.Url.Query</td> <td>?id=1019</td> <td> </td></tr> <tr> <td>Request.Url.Query[id]</td> <td>1019</td> <td> </td></tr> <tr> <td>Request.Url.Fragments</td> <td>/ <br /> News/ <br /> Press/ <br /> Content.aspx</td> <td> </td></tr> <tr> <td>Request.Url.Segments[0]</td> <td>/</td> <td> </td></tr> <tr> <td>System.IO.Path.GetDirectoryName(Request.PhysicalPath)</td> <td>D:\Projects\Solution\web\News\Press</td> <td>磁盘驱动器代号:\父目录\子目录\ </td></tr> <tr> <td>System.IO.Path.GetFileName(Request.PhysicalPath)</td> <td>Content.aspx</td> <td> </td></tr></tbody></table> <p>如果请求的地址为http://www.cnblogs.com/default.aspx/books 则: </p> <ul><li>Request.FilePath值为http://www.cnblogs.com/default.aspx</li> <li>Request.PathInfo 值为 /books</li> <li>Request.Path 值为 <a rel="nofollow" class="external free" href="http://www.cnblogs.com/default.aspx/books">http://www.cnblogs.com/default.aspx/books</a></li> <li>Request.RawUrl 值为 <a rel="nofollow" class="external free" href="http://www.cnblogs.com/default.aspx/books">http://www.cnblogs.com/default.aspx/books</a></li></ul> <p>如果请求地址为http://www.cnblogs.com/defaut.aspx?id=1&amp;name=kk则 </p> <ul><li>Request.FilePath值为http://www.cnblogs.com/default.aspx</li> <li>Request.PathInfo 值为 ""(空字符串)</li> <li>Request.Path 值为 <a rel="nofollow" class="external free" href="http://www.cnblogs.com/default.aspx">http://www.cnblogs.com/default.aspx</a></li> <li>Request.RawUrl 值为 <a rel="nofollow" class="external free" href="http://www.cnblogs.com/default.aspx?id=1&amp;name=kk">http://www.cnblogs.com/default.aspx?id=1&amp;name=kk</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="读取窗体变量四种方式"><span id=".E8.AF.BB.E5.8F.96.E7.AA.97.E4.BD.93.E5.8F.98.E9.87.8F.E5.9B.9B.E7.A7.8D.E6.96.B9.E5.BC.8F"></span>读取窗体变量四种方式</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=4" title="编辑章节:读取窗体变量四种方式"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="使用Request.Form属性读取窗体变量"><span id=".E4.BD.BF.E7.94.A8Request.Form.E5.B1.9E.E6.80.A7.E8.AF.BB.E5.8F.96.E7.AA.97.E4.BD.93.E5.8F.98.E9.87.8F"></span>使用Request.Form属性读取窗体变量</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=5" title="编辑章节:使用Request.Form属性读取窗体变量"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>HtmlForm控件的Method属性的默认值为post。在这种情况下,当用户提交网页时,表单数据将以HTTP标头的形式发送到服务器端。此时,可以使用Request对象的Form属性来读取窗体变量。如:txtUserName和txtPassword的文本框控件,则可以通过以下形式来读取它们的值: Request.Form["txtUserName"] ;Request.Form["txtPassword"] </p> <div class="mw-heading mw-heading3"><h3 id="使用Request.QueryString属性读取窗体变量"><span id=".E4.BD.BF.E7.94.A8Request.QueryString.E5.B1.9E.E6.80.A7.E8.AF.BB.E5.8F.96.E7.AA.97.E4.BD.93.E5.8F.98.E9.87.8F"></span>使用Request.QueryString属性读取窗体变量</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=6" title="编辑章节:使用Request.QueryString属性读取窗体变量"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>如果将HtmlForm控件的Method属性设置为get,则当用户提交网页时,表单数据将附加在网址后面发送到服务器端。在这种情况下,可以使用Request对象的QueryString属性读取窗体变量。Request.QueryString["txtUserName"] ;Request.QueryString["txtPassword"] </p> <div class="mw-heading mw-heading3"><h3 id="使用Request.Params属性读取窗体变量"><span id=".E4.BD.BF.E7.94.A8Request.Params.E5.B1.9E.E6.80.A7.E8.AF.BB.E5.8F.96.E7.AA.97.E4.BD.93.E5.8F.98.E9.87.8F"></span>使用Request.Params属性读取窗体变量</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=7" title="编辑章节:使用Request.Params属性读取窗体变量"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>不论HtmlForm控件的Method属性取什么值,都可以使用Request对象的Params属性来读取窗体变量的内容,如Request.Params["txtPassword"]或者Request.["txtPassword"],优先获取GET方式提交的数据,它会在QueryString、Form、ServerVariable中都按先后顺序搜寻一遍。 </p> <div class="mw-heading mw-heading3"><h3 id="通过服务器控件的属性直接读取窗体变量"><span id=".E9.80.9A.E8.BF.87.E6.9C.8D.E5.8A.A1.E5.99.A8.E6.8E.A7.E4.BB.B6.E7.9A.84.E5.B1.9E.E6.80.A7.E7.9B.B4.E6.8E.A5.E8.AF.BB.E5.8F.96.E7.AA.97.E4.BD.93.E5.8F.98.E9.87.8F"></span>通过服务器控件的属性直接读取窗体变量</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=8" title="编辑章节:通过服务器控件的属性直接读取窗体变量"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>除了以上3种方式之外,也可以通过服务器控件的属性来直接读取窗体变量,这是获取表单数据的最常用、最简单的方式。例如: txtUserName.Text </p> <div class="mw-heading mw-heading2"><h2 id="Request.ServerVariables集合中获取到的相关信息"><span id="Request.ServerVariables.E9.9B.86.E5.90.88.E4.B8.AD.E8.8E.B7.E5.8F.96.E5.88.B0.E7.9A.84.E7.9B.B8.E5.85.B3.E4.BF.A1.E6.81.AF"></span>Request.ServerVariables集合中获取到的相关信息</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=9" title="编辑章节:Request.ServerVariables集合中获取到的相关信息"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Request.ServerVariables是一个很强大的工具,可以帮助我们获取很多client和web宿主的信息,有兴趣的朋友可以通过以下代码看看它到底包含什么信息 </p> <pre> foreach (string s in Request.ServerVariables) { Response.Write(s + " &#160;: " + Request.ServerVariables[s] + "<br />"); } </pre> <p>服务器变量名,通过Request.ServerVariables[服务器变量名]获取的值 </p> <ul><li>APPL_MD_PATH&#160;: /LM/W3SVC/894523/Root</li> <li>APPL_PHYSICAL_PATH&#160;: D:\VssWorkFolder\British_School_MIS\src\WebSite\</li> <li>INSTANCE_META_PATH&#160;: /LM/W3SVC/894523</li> <li>LOCAL_ADDR&#160;: 192.168.1.6</li> <li>PATH_INFO&#160;: /SysOption/BillingSetup1.aspx</li> <li>PATH_TRANSLATED&#160;: D:\VssWorkFolder\British_School_MIS\src\WebSite\SysOption\BillingSetup1.aspx</li> <li>REMOTE_ADDR&#160;: 192.168.1.6</li> <li>REMOTE_HOST&#160;: 192.168.1.6</li> <li>SCRIPT_NAME&#160;: /SysOption/BillingSetup1.aspx</li> <li>SERVER_NAME&#160;: 192.168.1.6</li> <li>URL&#160;: /SysOption/BillingSetup1.aspx</li></ul> <div class="mw-heading mw-heading2"><h2 id="http地址与本机地址的相互转化"><span id="http.E5.9C.B0.E5.9D.80.E4.B8.8E.E6.9C.AC.E6.9C.BA.E5.9C.B0.E5.9D.80.E7.9A.84.E7.9B.B8.E4.BA.92.E8.BD.AC.E5.8C.96"></span>http地址与本机地址的相互转化</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=10" title="编辑章节:http地址与本机地址的相互转化"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>在服务器端读取一个文件,需要把这个文件的http地址转化为本机地址。如: </p> <pre> Response.Write(Request.MapPath(Request.Path)); </pre> <p>反之,转换为http地址使用Page.ResolveClientUrl或Page.ResolveUrl: </p> <pre> Response.Write(Page.ResolveClientUrl("~/a/a.jpg")); 输出为 ../a/a.jpg Response.Write(Page.ResolveUrl("~/a/a.jpg")); 输出为 /a/a.jpg </pre> <table class="wikitable"> <caption>ServerVariables集合对象中保存的常用信息变量 </caption> <tbody><tr> <th>名字</th> <th>解释 </th></tr> <tr> <td>Request.ServerVariables("Appl_Physical_Path")</td> <td>与应用程序元数据库路径相应的物理路径 </td></tr> <tr> <td>Request.ServerVariables("All_Http")</td> <td>客户端发送的所有HTTP标头,前缀HTTP_ </td></tr> <tr> <td>Request.ServerVariables("All_Raw")</td> <td>客户端发送的所有HTTP标头,其结果和客户端发送时一样,没有前缀HTTP_ </td></tr> <tr> <td>Request.ServerVariables("Appl_MD_Path")</td> <td>应用程序的元数据库路径 </td></tr> <tr> <td>Request.ServerVariables("Auth_Password")</td> <td>当使用基本验证模式时,客户在密码对话框中输入的密码 </td></tr> <tr> <td>Request.ServerVariables("Auth_Type")</td> <td>是用户访问受保护的脚本时,服务器用於检验用户的验证方法 </td></tr> <tr> <td>Request.ServerVariables("Auth_User")</td> <td>代证的用户名 </td></tr> <tr> <td>Request.ServerVariables("Cert_Cookie")</td> <td>唯一的客户证书ID号 </td></tr> <tr> <td>Request.ServerVariables("Cert_Flag")</td> <td>客户证书标誌,如有客户端证书,则bit0为0如果客户端证书验证无效,bit1被设置为1 </td></tr> <tr> <td>Request.ServerVariables("Cert_Issuer")</td> <td>用户证书中的发行者字段 </td></tr> <tr> <td>Request.ServerVariables("Cert_Keysize")</td> <td>安全套接字层连接关键字的位数,如128 </td></tr> <tr> <td>Request.ServerVariables("Cert_Secretkeysize")</td> <td>服务器验证私人关键字的位数如1024 </td></tr> <tr> <td>Request.ServerVariables("Cert_Serialnumber")</td> <td>客户证书的序列号字段 </td></tr> <tr> <td>Request.ServerVariables("Cert_Server_Issuer")</td> <td>服务器证书的发行者字段 </td></tr> <tr> <td>Request.ServerVariables("Cert_Server_Subject")</td> <td>服务器证书的主题字段 </td></tr> <tr> <td>Request.ServerVariables("Cert_Subject")</td> <td>客户端证书的主题字段 </td></tr> <tr> <td>Request.ServerVariables("Content_Length")</td> <td>客户端发出內容的长度 </td></tr> <tr> <td>Request.ServerVariables("Content_Type")</td> <td>客户发送的form內容或HTTPPUT的数据类型 </td></tr> <tr> <td>Request.ServerVariables("Https")</td> <td>如果请求穿过安全通道(SSL),则返回ON如果请求来自非安全通道,则返回OFF </td></tr> <tr> <td>Request.ServerVariables("Http_Accept_Encoding")</td> <td>返回內容如:gzip,deflate </td></tr> <tr> <td>Request.ServerVariables("Http_Accept_Language")</td> <td>返回內容如:en-us </td></tr> <tr> <td>Request.ServerVariables("Http_Connection")</td> <td>返回內容:Keep-Alive </td></tr> <tr> <td>Request.ServerVariables("Http_Cookie")</td> <td>返回包含在request中的cookie字符串 </td></tr> <tr> <td>Request.ServerVariables("Http_Host")</td> <td>返回服务器地址 </td></tr> <tr> <td>Request.ServerVariables("Http_User_Agent")</td> <td>返回內容:Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.1;SV1) </td></tr> <tr> <td>Request.ServerVariables("Https_Keysize")</td> <td>安全套接字层连接关键字的位数,如128 </td></tr> <tr> <td>Request.ServerVariables("Http_Referer")</td> <td>请求的字符串內容 </td></tr> <tr> <td>Request.ServerVariables("Https_Secretkeysize")</td> <td>服务器验证私人关键字的位数如1024 </td></tr> <tr> <td>Request.ServerVariables("Https_Server_Issuer")</td> <td>服务器证书的发行者字段 </td></tr> <tr> <td>Request.ServerVariables("Https_Server_Subject")</td> <td>服务器证书的主题字段 </td></tr> <tr> <td>Request.ServerVariables("Instance_ID")</td> <td>IIS实例的ID号 </td></tr> <tr> <td>Request.ServerVariables("Instance_Meta_Path")</td> <td>响应请求的IIS实例的元数据库路径 </td></tr> <tr> <td>Request.ServerVariables("Local_Addr")</td> <td>返回接受请求的服务器地址 </td></tr> <tr> <td>Request.ServerVariables("Path_Info")</td> <td>客户端提供的路径信息 </td></tr> <tr> <td>Request.ServerVariables("Path_Translated")</td> <td>通过由虚拟至物理的映射后得到的路径 </td></tr> <tr> <td>Request.ServerVariables("Query_String")</td> <td>查询字符串內容 </td></tr> <tr> <td>Request.ServerVariables("Remote_Addr")</td> <td>发出请求的远程主机的IP地址 </td></tr> <tr> <td>Request.ServerVariables("Remote_Host")</td> <td>发出请求的远程主机名称 </td></tr> <tr> <td>Request.ServerVariables("Request_Method")</td> <td>提出请求的方法比如GET、HEAD、POST等等 </td></tr> <tr> <td>Request.ServerVariables("Server_Name")</td> <td>服务器的主机名、DNS地址或IP地址 </td></tr> <tr> <td>Request.ServerVariables("Server_Port_Secure")</td> <td>如果接受请求的服务器端口为安全端口时,则为1,否则为0 </td></tr> <tr> <td>Request.ServerVariables("Server_Protocol")</td> <td>服务器使用的协议的名称和版本 </td></tr> <tr> <td>Request.ServerVariables("Server_Software")</td> <td>应答请求并运行网关的服务器软件的名称和版本 </td></tr> <tr> <td>Request.ServerVariables("Server_Port")</td> <td>接受请求的服务器端口号 </td></tr> <tr> <td>Request.ServerVariables("Script_Name")</td> <td>执行脚本的名称 </td></tr> <tr> <td>Request.ServerVariables("Url")</td> <td>返回服务器地址 </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="取得客户端浏览器信息"><span id=".E5.8F.96.E5.BE.97.E5.AE.A2.E6.88.B7.E7.AB.AF.E6.B5.8F.E8.A7.88.E5.99.A8.E4.BF.A1.E6.81.AF"></span>取得客户端浏览器信息</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=11" title="编辑章节:取得客户端浏览器信息"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>通过Request对象的Browser属性得到。需要利用Browser属性生成一个HttpBrowserCapabilities类型的对象实例。 </p> <table class="wikitable"> <caption>HttpBrowserCapabilities类具有的常用属性 </caption> <tbody><tr> <th>名字</th> <th>解释 </th></tr> <tr> <td>Browser</td> <td>检测浏览器 </td></tr> <tr> <td>Version</td> <td>检测浏览器的版本 </td></tr> <tr> <td>Type</td> <td>检测浏览器的的类型 </td></tr> <tr> <td>Platform</td> <td>检测浏览器所在平台 </td></tr> <tr> <td>Frames</td> <td>检测浏览器是否支持Frames </td></tr> <tr> <td>ActiveXControls</td> <td>检测浏览器是否支持ActiveX插件 </td></tr> <tr> <td>Cookies</td> <td>检测浏览器是否支持Cookies </td></tr> <tr> <td>VBScript</td> <td>检测浏览器是否支持VBSCRIPT </td></tr> <tr> <td>Javascript</td> <td>检测浏览器是否支持Javascript </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="读取客户端Cookie"><span id=".E8.AF.BB.E5.8F.96.E5.AE.A2.E6.88.B7.E7.AB.AFCookie"></span>读取客户端Cookie</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=ASP.NET/Request&amp;action=edit&amp;section=12" title="编辑章节:读取客户端Cookie"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Cookie是在HTTP协议下服务器或脚本可以维护客户工作站上信息的一种方式。Cookie是由Web服务器保存在用户浏览器上的小文本文件,它可以包含有关用户的信息,这些信息以名/值对的形式储存在文本文件中。无论何时,只要用户连接接到服务器,Web站点就可以访问Cookie信息。Cookie保存在用户的Cookie文件中,当下一次用户返回时,仍然可以对它进行调用。Cookies集合是由一些Cookie对象组成的。Cookie对象的类名为HttpCookie。 </p> <table class="wikitable"> <caption>HttpCookie类的主要属性 </caption> <tbody><tr> <th>名字</th> <th>解释 </th></tr> <tr> <td>ExpiresAbsolute</td> <td>赋一个日期,过了这个日期Cookie就不能再被使用 </td></tr> <tr> <td>Comment</td> <td>获取或设置服务器可添加到Cookie中的注释 </td></tr> <tr> <td>CommentUri</td> <td>获取或设置服务器可通过Cookie来提供的URI注释 </td></tr> <tr> <td>Discard</td> <td>获取或设置由服务器设置的丢弃标志 </td></tr> <tr> <td>Domain</td> <td>定义Cookie要传送的唯一域 </td></tr> <tr> <td>Expired</td> <td>false:过期|没过期) </td></tr> <tr> <td>Expires</td> <td>获取或设置Cookie的过期日期和时间(返回DateTime)(默认MinValue,会话Cookie) </td></tr> <tr> <td>HasKeys</td> <td>false) </td></tr> <tr> <td>HttpOnly</td> <td>false) </td></tr> <tr> <td>Item</td> <td>获取HttpCookie.Values属性的快捷方式(为与老ASP版本兼容) </td></tr> <tr> <td>Name</td> <td>获取或设置Cookie名 </td></tr> <tr> <td>Path</td> <td>获取或设置要与当前Cookie一起传输的虚拟路径。获取或设置Cookie适用于的URI </td></tr> <tr> <td>Port</td> <td>获取或设置Cookie适用于的TCP端口的列表 </td></tr> <tr> <td>Secure</td> <td>获取或设置是否使用安全套接字层SSL(即仅通过HTTPS)传输Cookie </td></tr> <tr> <td>TimeStamp</td> <td>获取Cookie作为DateTime发出的时间 </td></tr> <tr> <td>Value</td> <td>获取或设置单个Cookie的值 </td></tr> <tr> <td>Values</td> <td>获取单个Cookie对象所包含的键值对的集合 </td></tr> <tr> <td>Version</td> <td>获取或设置Cookie的HTTP状态维护版本 </td></tr></tbody></table> <p>使用Cookie时,应注意以下几点 </p> <ul><li>使用Cookie保存客户端浏览器请求服务器页面的请求信息时,保存时间的长短取决于Cookie对象的Expires属性,可以根据需要来设置。若未设置Cookie的失效日期,则它们仅保存到关闭浏览器为止。若将Cookie对象的Expires属性设置为DateTime.MaxValue,则表示Cookie永远不会过期。</li> <li>Cookie存储的数据量有所限制,大多数浏览器支持的最大容量为4096字节,因此不要用Cookie来保存大量数据。</li> <li>并非所有浏览器都支持Cookie,并且数据是以明文形式保存在客户端计算机中,因此最好不要用Cookie来保存敏感的未加密数据。</li> <li>在ASP.NET中有两个Cookies集合,即:Response对象的Cookies集合和Request对象的Cookies集合,但两者的作用有所不同,通过前者可以将Cookie写入客户端,通过后者可以读取存储在客户端的Cookie。</li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐74dc4d995d‐pgzgg Cached time: 20241103173955 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.043 seconds Real time usage: 0.044 seconds Preprocessor visited node count: 40/1000000 Post‐expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 2/100 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 0.000 1 -total --> <!-- Saved in parser cache with key zhwikibooks:pcache:idhash:30960-0!canonical!zh and timestamp 20241103173955 and revision id 141729. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">检索自“<a dir="ltr" href="https://zh.wikibooks.org/w/index.php?title=ASP.NET/Request&amp;oldid=141729">https://zh.wikibooks.org/w/index.php?title=ASP.NET/Request&amp;oldid=141729</a>”</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> 此页面最后编辑于2021年7月10日 (星期六) 16:34。</li> <li id="footer-info-copyright">本站的全部文字在<a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/deed.zh">創用CC 姓名標示-相同方式分享 4.0 協議</a>之條款下提供,附加條款亦可能應用(請參閱<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">使用條款</a>)。<br /> Wikibooks®和維基教科書標誌是<a rel="nofollow" class="external text" href="https://wikimediafoundation.org">維基媒體基金會</a>的註冊商標;維基&#8482;是維基媒體基金會的商標。<br /> 維基媒體基金會是在美國佛羅里達州登記的501(c)(3)<a class="external text" href="https://donate.wikimedia.org/wiki/Special:MyLanguage/Tax_deductibility">免稅</a>、非營利的慈善機構。<br /></li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">隐私政策</a></li> <li id="footer-places-about"><a href="/wiki/Wikibooks:%E5%85%B3%E4%BA%8E">关于维基教科书</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikibooks:%E5%85%8D%E8%B4%A3%E5%A3%B0%E6%98%8E">免责声明</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">行为准则</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">开发者</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/zh.wikibooks.org">统计</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie声明</a></li> <li id="footer-places-mobileview"><a href="//zh.m.wikibooks.org/w/index.php?title=ASP.NET/Request&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">手机版视图</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-h9gxb","wgBackendResponseTime":165,"wgPageParseReport":{"limitreport":{"cputime":"0.043","walltime":"0.044","ppvisitednodes":{"value":40,"limit":1000000},"postexpandincludesize":{"value":0,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":2,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":0,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 0.000 1 -total"]},"cachereport":{"origin":"mw-web.codfw.main-74dc4d995d-pgzgg","timestamp":"20241103173955","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10