如何将此网址转换为字符串? [英] how to convert this url to String?

查看:157
本文介绍了如何将此网址转换为字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将使用linq从数据库获取的URL转换为String ??

how can i convert this url taken from the database using linq to String??

var x in nowmov
playbtton.OnClientClick = setURL(x.Trailer_URL);



x.Trailer_URL 是url



x.Trailer_URL is the url

推荐答案

嗯... x.Trailer_URL.ToString?
Uhh ... x.Trailer_URL.ToString?


MSDN String.convert [
MSDN String.convert[^]

string URL_String = String.convert(Trailer_URL);





Would this work for you?


您的问题中的x是什么类型的变量?它应该是 Uri [
What type of variable is x in your question? It should be a Uri[^] object, which includes a ToString() method.


这篇关于如何将此网址转换为字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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