Asp.net Disable postback LinkButton

Add fallowing code to your page_load HTML:

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

Code:
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:
http://code.msdn.microsoft.com/PowerCommands


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.

Example:

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

Easy isn’t it…