如何从地址栏获取URL到字符串 [英] how to get url to a string from the address bar

查看:68
本文介绍了如何从地址栏获取URL到字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从地址栏获取文本(当用户在地址栏中键入内容)以从我的数据库生成匹配的cookie。

emrgncy plz帮助我

I want to get text(while the user typing in address bar ) from the address bar to generate matching cookies from my database.
Its emrgncy plz help me

推荐答案

你好专业..



这些可以帮助你完成工作的方式



Hello professional..

these all some kind of way that can help you to do your work

string url = HttpContext.Current.Request.Url.AbsoluteUri;
// http://localhost:5505/webproject/index.aspx

string path = HttpContext.Current.Request.Url.AbsolutePath;
// /webproject/index.aspx

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





,看看这个...



http://stackoverflow.com/questions/13027584/how-to-get-the-value-from-address-bar-客户输入 [ ^ ]



很乐意提供帮助。



and just look at this...

http://stackoverflow.com/questions/13027584/how-to-get-the-value-from-address-bar-entered-by-client[^]

happy to help.


这篇关于如何从地址栏获取URL到字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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