开发者

Keep target page stay in jQuery Thickbox after post-back

I have an asp.net page "demo.aspx", that has a normal link called "Demo Link" which uses jQuery Thick box. The page that is wrapped inside the Thickbox is "target.aspx", that has a button "Demo Button" and a label.

If I click on the Demo Link, it show the "target.aspx" wrapped inside the Thickbox nicely. However, If I click on the "Demo Button", Thickbox is disappeared, "target.aspx" is not wrapped in Thickbox anymore, it is displayed like a normal asp.net page.

Here's the mark-up code of demo.aspx:

<a href="target.aspx?height=600&width=800" class="thickbox" title="">Testing Thickbox with Post-back</a>

Here's the code-behind of target.aspx:

Protected Sub btnDemo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDemo.Click

    lblDemo.Text = "Hello World!"

开发者_运维百科End Sub

How do I keep target.aspx in the Thickbox after the post-back of itself?

Thank you.


I went back to jQuery Thickbox page again and found the answer there on the iFramed content example.

I just added "keepThis=true" to the the link:

<a href="target.aspx?keepThis=true&height=600&width=800" class="thickbox" title="">Testing Thickbox with Post-back</a>

--

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜