按一下以給予評分及指教
MSDN
MSDN Library
.NET 開發
先前版本
類別庫參考
System.Web
 UrlPathEncode 方法

  開啟低頻寬檢視
本頁僅適用於
Microsoft Visual Studio 2005/.NET Framework 2.0

其他版本也適用於下列軟體:
.NET Framework 類別庫
HttpUtility.UrlPathEncode 方法

將 URL 字串的路徑部分編碼,讓 HTTP 穩定地從 Web 伺服器傳輸至用戶端。

命名空間: System.Web
組件: System.Web (在 system.web.dll 中)

Visual Basic (宣告)
Public Shared Function UrlPathEncode ( _
    str As String _
) As String
Visual Basic (使用方式)
Dim str As String
Dim returnValue As String

returnValue = HttpUtility.UrlPathEncode(str)
C#
public static string UrlPathEncode (
    string str
)
C++
public:
static String^ UrlPathEncode (
    String^ str
)
J#
public static String UrlPathEncode (
    String str
)
JScript
public static function UrlPathEncode (
    str : String
) : String

參數

str

要作 URL 編碼的文字。

傳回值

URL 編碼的文字。

URL 編碼方式確保所有瀏覽器將會正確傳輸 URL 字串中的文字。?、&、/ 和空格之類的字元可能會在某些瀏覽器中被截斷或毀損,因此這些字元必須在 <A> 標記或查詢字串中編碼,而查詢字串中的字串可能是瀏覽器以要求字串所重新傳送的。

Windows 98、 Windows 2000 SP4、 Windows Server 2003、 Windows XP Media Center Edition、 Windows XP Professional x64 Edition、 Windows XP SP2、 Windows XP Starter Edition

.NET Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱系統需求一節的內容。

.NET Framework

支援版本:2.0、1.1
社群內容   什麼是社群內容?
新增內容 RSS  註解
Processing
© 2009 Microsoft Corporation. 著作權所有,並保留一切權利。 使用規定  |  商標  |  隱私權聲明
Page view tracker