2010-06-22 40 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

相關問題