【问题标题】:open a pop up when querystring matches当查询字符串匹配时打开一个弹出窗口
【发布时间】:2010-06-22 16:51:52
【问题描述】:

无论如何我可以弹出一个窗口,只匹配来自 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# 谢谢

我试过了,效果很好。

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

非常感谢你

【问题讨论】:

    标签: popup query-string tooltip


    【解决方案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)
    
    
    }
    

    【讨论】:

    • 你好普拉奈。非常感谢您的回复。我编辑(扩展)了我的问题,你可以看看它,请分享你的想法..
    • 对于工具提示,我认为您使用 jquery 插件可用于工具提示它很好
    猜你喜欢
    • 1970-01-01
    • 2012-12-12
    • 2021-12-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-20
    • 1970-01-01
    相关资源
    最近更新 更多