开发者

open a pop up when querystring matches

Is there anyway that I can pop up a window with just matching a query string from the url. Sample code is like follows

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

if (popup == "raise")
 {

 //Here whe开发者_开发技巧n the query string matches to raise the pop up shoul be displayed with some information which is already grab in this class
}

Please help me. Thank you

2# Thank you

I tried it and it is working fine.

Now I need to extend my question as kinda change in my requirement. Instead of simple popup I want to show a tooltip on querystring. I tried using ToolStripDropDown class but I think it is for WPF application. Mine is pure webofrm application. Is there any chance that I can accomplish this tooltip pop up when query string matches with specific string?

Thank you veru much


if you are using asp.net than you can easily do it using RegisterStartupScript

for example

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜