asp.net中帧向前的代码 [英] code for frame forward in asp.net
问题描述
我使用以下代码将页面重定向到另一个窗口
protected void grdview_RowCommand(object sender,GridViewCommandEventArgs e)
{
if(e.CommandName ==site)
{
string url =http://+ e.CommandArgument .ToString();
Response.Write(< script> window.open(''+ url +'');
}
}
现在它在地址栏中显示网站名称
但是我想在WINDOW的地址栏中获取IP地址(OPEND站点)。哪个IP地址保存在我的SQL DB中。
Plz帮助我
感谢advnc
你的e.CommandArgument
属性应该在Row_Command
事件中返回 IP地址。
使用域名或ip地址并不重要,它总是打开同一页面。
但是如果你想要打开一个地址栏上显示IP地址的网站,你必须打开带有IP地址的链接。
例如,下面的这两个链接打开同一页面,你可以吐出差异通过查看地址栏。
在新标签页中打开这些链接,您将了解自己。
与IP地址链接 [ ^ ]
链接域 [ ^ ]
hi,
I using Following code for redirecting a page to another window
protected void grdview_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "site")
{
string url = "http://" + e.CommandArgument.ToString();
Response.Write("<script>window.open(''" + url + "'' );
}
}
now it shows the site name in address bar
BUT I WANT TO GET THE IP ADDRESS (OF OPEND SITE) IN ADDRESS BAR OF THE WINDOW. WHICH IP ADDRESS SAVED IN MY SQL DB.
Plz Help Me
Thanks in advnc
Youre.CommandArgument
property should return IP Address onRow_Command
event.
It doesn''t matter you use a domain name or ip adress, it always open the same page.
But if you want to open an website with the ip address displayed on the address bar you must open the link with ip address.
For example, both of these links below open the same page and you can spit out the differences by looking at the address bar.
Open these links in new tab, and you will understand by your self.
link with ip address[^]
link with domain[^]
这篇关于asp.net中帧向前的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!