Archive

Archive for June, 2010

Using Jquery Thickbox with Asp.net

June 28, 2010 2 comments

ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.

Demo, Examples,Implementation:

http://jquery.com/demo/thickbox/

Thickbox with Asp.net Gridview

http://mattberseth.com/blog/2008/06/masterdetail_with_the_gridview_1.html

Thickbox From Codebehind(ServerSide)

http://mwtech.blogspot.com/2009/05/calling-thickbox-from-server-side-code.html

Thickbox with Server side buttons

http://mwtech.blogspot.com/2009/05/using-thickbox-with-server-side-buttons.html

Download Demo:

http://pocketpollster.com/apps/ThickBoxDemo/

Advertisements

Toggle/(Hide/Show) Div Using Jquery

var hideshowdiv = “#” + document.getElementById(divid).id;

$(function() {

$(hideshowdiv).toggle();

});

Various other ways and effects to hide/show are as follows:

Using toggle effects

$(function() {

$(hideshowdiv).toggle(“slow”);

});

Using slideToggle

$(function() {

$(hideshowdiv). slideToggle(“slow”);

});

Using  slideDown and slideUp

$(function() {

if (document.getElementById(divid).style.display == “none”) {

$(hideshowdiv).slideDown(“slow”);

}

else if (document.getElementById(divid).style.display == “block”) {

$(hideshowdiv).slideUp(“slow”);

}

});

Using hide(), show()

$(hideshowdiv).hide();

$(hideshowdiv).show();

Improve Stored Procedure Performance in SQL SERVER using SET NOCOUNT ON

SET NOCOUNT ON

This one line of code, put at the top of a stored procedure turns off the messages that SQL Server sends back to the client after each T-SQL statement is executed.

You can read the detailed description here:

http://msdn.microsoft.com/en-us/library/ms189837.aspx

http://www.mssqltips.com/tip.asp?tip=1226

Using AjaxControlToolkit Modal Popup

The Modal Popup extender comes with Ajaxcontrol toolkit and  allows a page to display content to the user in a “modal” manner which prevents the user from interacting with the rest of the page.

Demos,Documentation,Download:

http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx

ModalPopup with Asp.net In Various Scenarios using Javascript, iframes, etc

http://www.codeproject.com/KB/ajax/ASPModalInAction.aspx

ModalPopup Examples

http://mattberseth.com/blog/2007/07/modalpopupextender_example_cre.html

Other Examples can be found at

http://mattberseth.com/blog/modalpopupextender/