將已經將為在 URL 中傳輸而進行編碼的字串轉換為解碼的字串。
命名空間: System.Web
組件: System.Web (在 system.web.dll 中)
Public Shared Function UrlDecode ( _
str As String _
) As String
Dim str As String
Dim returnValue As String
returnValue = HttpUtility.UrlDecode(str)
public static string UrlDecode (
string str
)
public:
static String^ UrlDecode (
String^ str
)
public static String UrlDecode (
String str
)
public static function UrlDecode (
str : String
) : String
參數
- str
要解碼的字串。
傳回值
解碼的字串。
如果空白或標點符號之類的字元被傳入 HTTP 資料流,在接收端可能無法正確解譯它們。URL 編碼方式會將 URL 中不允許的字元轉換為相等的字元實體;URL 解碼方式會復原該編碼方式。例如,當嵌入至文字區塊中以便在 URL 中傳輸時,‹ 和 › 字元會編碼為 %3c 和 %3d。
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、1.0