Disable postback LinkButton

Add fallowing code to your page_load HTML:

<asp:LinkButton ID="myLinkButton" runat="server" Text="Click Me"></asp:LinkButton>

protected void Page_Load(object sender, EventArgs e)
myLinkButton.Attributes.Add("onClick", "return false;");

Happy tips&tricks :)

Sharepoint solution deployment with Stsadm

Tips & Tricks :
Here is the command list of stsadm that deploy a wsp file to your sharpoint site.
//First we retract if exist solution
stsadm -o retractsolution -name myproject.wsp -immediate
// Forcing sharepoint to run timer jobs.
stsadm -o execadmsvcjobs
//and delete solution after retract
stsadm -o deletesolution -name myproject.wsp
//add solution
stsadm -o addsolution -filename c:\solutions\Hello.wsp
//deploy it
stsadm -o deploysolution -name Hello.wsp -immediate -allowGacDeployment
//Execute timer jobs
stsadm -o execadmsvcjobs
//Recycle Application Pool.
%windir%\system32\inetsrv\appcmd recycle AppPool “Application Pool Name”
Thats all .

.Net Tools – PowerCommands for Visual Studio 2008

PowerCommands 1.1 is a set of useful extensions for the Visual Studio 2008 adding additional functionality to various areas of the IDE. The source code is included and requires the VS SDK for VS 2008 to allow modification of functionality or as a reference to create additional custom PowerCommand extensions

Its very useful tool for visual studio2008 specially  some features that Open command prompt, Copy Reference,  Email code snipet, Copy project as reference and many more.

Project Page:

License: Free
My Rank : 8.7

Some tools make life easier use it. bye now…

Register your dll’s to GAC with Visual Studio IDE

In this article we will create an external tool for registering our dlls to GAC .

1) Click in your VS.IDE menu Tools -> External Tools…

2) Click to Add button

Title = Register GAC

Command =  C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe

Arguments = -i $(TargetPath)

3) Make checked “Use Output window” for results

4) Click OK .

Now you can use your new external tool in your IDE’s -> Tools Menu…

Some tools save time or not ? bye now…

Sharepoint Exit Edit Mode programmatically

Sharepoint Tips & Tricks: Sharepoint exit edit mode programmatically.

We can do it with redirect to same page.

“Microsoft.SharePoint.Utilities” Namespace has a static class named SPUtility.


SPUtility.Redirect(SPContext.Current.ListItem.File.ServerRelativeUrl , SPRedirectFlags.Default, this.Context);

Easy isn’t it…

The page took too long to save…

See my post about:

Saving Page Content Sharepoint with IE8 cause annoying delay:

See you next article…

Saving Page Content Sharepoint with IE8 cause annoying delay

This is very annoying problem when you are programming with IE8 and using sharepoint .We are working with custom layout pages coding and this problems occured and waste our valuable time.


When navigating away from a publishing page that is in edit mode the browser displays “Saving Page Content…” in the status bar which can take up some time (about 15 sec)  to complete before asking for confirmation to not save the page.There were no such error with either IE7 or FireFox.


SBN_CallBackHandler() client function of SaveBeforeNavigationControl is not called as it supposed to. It looks like the implementation of XMLHttpRequest object in IE8 is somehow different from the previous release

Solution: There are three different solution

1) Change IE8 configuration parameter

Click -> tools -> Internet Options -> Advanced (tab)  and uncheck

Enable native XMLHTTP support (checked by default)

(This solution not worked with me but some blogs say thats ok )

2) Edit
\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\PublishingConsole.ascx
and remove this component.
<PublishingWebControls:SaveBeforeNavigationControl id=”sbn1″ runat=”server”>
< / PublishingWebControls:SaveBeforeNavigationControl>
And also did not work for me !!

3) Add javascript to your page:

<script type=”text/javascript”>
function UnloadHandler()
document.body.onUnload = “”;
Thats all folks…