2010-06-22 39 views
1

有没有办法,我可以弹出一个窗口,只需匹配来自url的查询字符串。示例代码如下所示当查询字符串匹配时打开弹出窗口

string popup = context.Request.QueryString["raisepopup"]; 

if (popup == "raise") 
{ 

//Here when the query string matches to raise the pop up shoul be displayed with some information which is already grab in this class 
} 

请帮帮我。谢谢

2# 谢谢

我尝试过了,这是工作的罚款。

现在我需要延长我的问题,因为有点改变我的要求。我想在querystring上显示一个工具提示,而不是简单的弹出窗口。我尝试过使用ToolStripDropDown类,但我认为它适用于WPF应用程序。 Mine是纯webofrm应用程序。当查询字符串与特定字符串匹配时,是否有机会完成此工具提示?

谢谢veru多

回答

1

如果您正在使用asp.net比你可以使用RegisterStartupScript

例如

if (popup == "raise") { 

    string popupScript = "<script language='JavaScript'>" & _ 
"window.open('RtFileResult.aspx', '', " & _ 
"'width=750, height=580, 
scrollbars,status,menubar,resizable,toolbar,titleb ar,location');" & _ 
"</script>" 

Page.RegisterStartupScript("PopupScript", popupScript) 


} 
+0

HI Pranay轻松地做到这一点。非常感谢您的回复。我编辑(扩展)我的问题,你可以看看它,请分享你的想法.. – alienavatar 2010-06-23 13:23:10

+0

为工具提示我认为你使用jquery插件avaiable为tooltip它很好 – 2010-06-23 16:40:56

相关问题