buttonclick上标签上当前页面显示网址的代码 [英] code for display url of current page on label on buttonclick

查看:57
本文介绍了buttonclick上标签上当前页面显示网址的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在buttonclick

i want code for display url of current page on label on buttonclick

推荐答案

string url = HttpContext.Current.Request.Url.AbsoluteUri;
// complete url

string path = HttpContext.Current.Request.Url.AbsolutePath;
// path of url

string host = HttpContext.Current.Request.Url.Host;
// host mechine

string url = HttpContext.Current.Request.Url.AbsolutePath;
string url = HttpContext.Current.Request.Url.AbsolutePath;


这篇关于buttonclick上标签上当前页面显示网址的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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