如何在vb.net中解码网址 [英] how to decode a url in vb.net

查看:99
本文介绍了如何在vb.net中解码网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此行说未声明服务器。

Dim DecodedString As String = server.UrlDecode(context.Request.Form("DeckName"))

我在顶部输入了system.web。

I have imports system.web at the top. cannot seem to figure out why its not working.

推荐答案

使用 HttpUtility

Dim decodedUrl As String = HttpUtility.UrlDecode(encodedUrl)

此处有更多详细信息:

http://msdn.microsoft.com/zh-cn/library/system.web.httputility.urldecode.aspx

More details here:
http://msdn.microsoft.com/en-us/library/system.web.httputility.urldecode.aspx

这篇关于如何在vb.net中解码网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆