如何将任何网址转换为我的域名网址? [英] How to convert any url to my domain name url?
问题描述
你好,每个人,
请看下面的工作流程.
假设这是插入客户端的url和客户端的信息的字段.
客户名称:
客户端网址:
假设我在客户名称"字段中输入了ABC,在客户URL"字段中输入了http://www.abc.com/.
现在,在提交之后,它将被保存到表"tblClient"中.如下:
id clientName clientUrl
1个ABC http://www.abc.com/
现在,我想在浏览器上获取此ID,就像我在浏览器的地址栏中将其写为www.mywebsite.com/go.aspx?id=1一样,应该将其导航至http://www.abc.com /.
希望您了解工作流程或我的主题.所以请按照提示提出建议.
谢谢
Hello Every one,
Please have a look at the below work flow.
Suppose this is the field of inserting the client''s url and client''s info.
client Name :
client url :
Suppose i have entered ABC in client name field and http://www.abc.com/ in client url field.
Now after submission it will be saved to a table "tblClient" as below :
id clientName clientUrl
1 ABC http://www.abc.com/
Now i want to fetch this id on browser like if i will write it as www.mywebsite.com/go.aspx?id=1 in browser''s address bar it should be navigated to http://www.abc.com/ .
I hope you understand the work flow or my theme. so please suggest as per it.
Thanks
推荐答案
尝试以下步骤:
在go.aspx中,
1.读取字段"id"是否有任何查询字符串值
2.从数据库中获取值.
3.重定向到您从db
获取的客户端URL
例如
Try these steps :
In go.aspx,
1. Read if there is any query string value for field "id"
2. Fetch values from database.
3. Redirect to the Client URL you fetched from db
e.g.
if(!string.IsNullOrEmpty(Request.QueryString["id"]))
{
// fetch data from DB for ID = Request.QueryString["id"]
// Redirect to the URl in the record
Response.Redirect(ds.Tables[0].Rows[0]["clientUrl"].ToString());
}
这篇关于如何将任何网址转换为我的域名网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!