.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

thickbox close

Posted By:      Posted Date: August 25, 2010    Points: 0   Category :ASP.Net


how to call below jquery (thickbox)  in codebehind

$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");         

View Complete Post

More Related Resource Links

Close Thickbox From Button Click inside of iframe

I know this question has been asked several times, but all fo the answers I found did not work for me.I have a jQuery Thickbox that pops up and display's an iframe.  Within the iframe, there is a button that will sumit the form and then I would like thickbox to close as well.From what I have found, adding the command "parent.document.tb_remove()" to the OnClick tag in the button shoudl work but I keep getting the error:  Compiler Error Message: BC30456: 'document' is not a member of 'System.Web.UI.Control'.Here is the code of the aspx page that opens in the iframe:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="LeagueEmail.aspx.vb" Inherits="LeagueEmail" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <link rel="Stylesheet" type="text/css" href="CSS/mf42_layout1_setup.css" /> <link rel="Stylesheet" type="text/css" href="CSS/mf42_layout1_text.css" /> <link rel="stylesheet" href="CSS/thickbox.css" type="text/css" media="screen" /> <title></tit

multiple thickbox close



Iam using thickbox for my project i am calling multiple thickbox, i need to close thickbox ( that is thickbox inside thickbox)

Master-Detail with the GridView, DetailsView and jQuery's ThickBox

One more article about grids from Matt Berseth. This time he shows how to create master-detail with the gridview, detailsview and jQuery's ThickBox. He writes:
So I thought I would check some of this out and along the way rebuild my Master-Detail with the GridView, DetailView and ModalPopup Controls and replace the ModalPopup with jQuery's ThickBox. I found it pretty interesting - read on to see how it went

Master-Detail with the GridView, DetailView and jQuery's ThickBox

An example of using the jQuery ThickBox with ASP.NET's GridView and DetailView controls

WebDev.WebServer.exe has encounted a problem and needs to close when trying to view page in browser


Hi, whenever I load an aspx page in vwde2008, I get the message in the subject of this post.  After I click Ok on that, I get a dialog box, Unable to Connect to the ASP.Net development center.  What can I do to troubleshoot?

I am using Windows XP SP3, vwde2008 with SP1, on a HP desktop.  Also using Office 2003 if that is relevant at all.

Thanks, Justin

How to set session timeout and clear session in asp.net C# ? And kill session when close the web app


hi ,

How to set session timeout and clear session in web.config and login.aspx  ? And when we close the web application , the session must be cleared ?

I have use session.abandon as per below but is not working . Pls advise .


        protected void btnLogout_Click(object sender, EventArgs e)



How to Use Window.close() in C#


Hello Alll

Please Tell me  How to Use Window.close() in C#.. In this case i have to handle both serverside event and client side..


Partial Views and Popups...After clicking on Close need to refresh the page....


Hi All,


I amusing the PopUp example as suggestedin the above forum link.....

But now i want to Refresh the page after clicking on Close(x) ...

So please help me....

Please advice...

Thanks in advance...



how to call thickbox function in codebehind



i want to call thickbox.js function in codebehind , below the code in jquery

i want to call below code in codebehind

function tb_remove() {
    if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
        $("body","html").css({height: "auto", width: "auto"});
    document.onkeydown = "";
    document.onkeyup = "";
    return false;

thickbox iframe



i facing scenario is that i want to call my page in thickbox using i frame  in server side code

below the code  i tried. i want to pass the my aspx page

protected void Button1_Click(object sender, EventArgs e)
      ShowDialog(this, "Security Question & Answer", 500, 300, "sampleContent");
      TextBox1.Text = "workingmaster";

public static void ShowDialog(Page page, string title, int width, int height, string divTag)
      string script = "$(document).ready(function() {tb_show('";

// i want to pass my aspx page here

      script += title + "', '#TB_iframe=true    height=" + height.ToString();
      script += "&amp;width=" + width.ToString();
      script += "&amp;inlineId=" + divTag + "', null);});";

      ScriptManager.RegisterStartupScript(page, page.GetType(), "", script, true);

Refresh parent window and close popup window.


Hi All,

I've been spent the last couple hours trying to work on this issue. I an creating Facebook Oauth stuff, when i click on parent window. The popup shows the Facebook login, when i logged in with my details, it redirects to my site. But i need to close this popup after returning and refrsh the parent window.

can you please provide me this kind of stuff. i already spent whole day in this... Sealed Cry

If i could solve this then i will go for another logic but stucked on 1st step.



Close Tab doesn't logout


When closing my tab, Formsauthentication doesn't clear, thanks!

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)

      if (Classes.CStaticDataAccess.AuthenticateUser(Login1.UserName, Login1.Password))
        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, Login1.UserName, DateTime.Now, DateTime.Now.AddMinutes(1), false, "");
        string secureTicket = FormsAuthentication.Encrypt(ticket);
        HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, secureTicket);
        string redirectUrl = FormsAuthentication.GetRedirectUrl(Login1.UserName, false);

       // System.Web.Security.FormsAuthentication.SetAuthCookie(Login1.UserName, false);
        e.Authenticated = true;

        e.Authenticated = false;

 <authentication mode="Forms">
      <forms name=".ASPXFORMSAUTH" loginUrl="~/Ware2Login.aspx" protection="All" timeout="30" path="/" ></forms>
      <deny users="?"/>

close pop up and refresh main page after popup close

I am working on a application in which When user clicks on a button  he should be redirected to facebook login page and after successfull login he shud be reirected back to my page. It all is working fine but now I have to do like thiswhen user click on the Button the the facebookbacklogin page shud be opened in popUp and when login is done successfully the popup window shud be closed and the main page shud be refreshed. anf If user is already login the popup window shud not be opened.How can i do this..How can I KNow that a popup window is opened and how can I close that??How to refresh when popup window is closed.I ahve to do like on this site..http://blippy.com/

close ColorBox after from submit

I'm looking for code examples on how to close ColorBox modal window with a click of a submit button of a contact form inside the modal dialog, Thanks...

list webpart, not using the sourse url, but referring back to the library view on close.

i have a webpart which brings a list in to my front page. -when user clicks, it shows  the item, and when he clicks on close,it takes him back to the library view. not back to the page,from where the request has initiated. we are using f5 load balancer, and our webapplications are extended. is there somesetup i am missing, so that i can make the sourse url's refer back to the originating page.        

How to delay the close() in client

HI,        I'm writing a WCF using wsDualHttpBinding as binding property, in my client side i specified the closeTimeout as 00:00:00, it throws the timout exception, when i closed the channel, using close() in client side code.   However, if i specify the closeTimeout  as 00:00:01, it will finish the close of channel, within 1 second. But for 0.01, 0.1 second it cannot able to close, now i want to specify a 30 second closeTimeout, and in the code behind i want to make the close to take more time to finish closing the channel. How can i make the close() to wait,   any idea,

Close all existing connections

I have written code to manage the partitions in a database. I see that this code gets deadlocked often because of some open connections.   Is there someway to close all existing connections?   I know of one approach which is to alter the database to a single user mode. ... but wanted to know if there is something more light weight.    
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend