Sunday, October 7, 2012

Refresh the parent and close the popup window


The below code is for asp.net, to refresh the parent window and close the popup window at the same time.

            Dim strScript As String = "window.opener.location.reload(); self.close();"
            ScriptManager.RegisterStartupScript(Me, Me.GetType, "ALERT", strScript, True)

Sunday, June 10, 2012

What type of applications can we develop using .NET?


Following list will give us an idea about various types of application that we can develop on .NET.

1. ASP.NET Web applications: These include dynamic and data driven browser based applications.
2. Windows Form based applications: These refer to traditional rich client applications.
3. Console applications: These refer to traditional DOS kind of applications like batch scripts.
4. Component Libraries: This refers to components that typically encapsulate some business logic.
5. Windows Custom Controls: As with traditional ActiveX controls, you can develop your own windows controls.
6. Web Custom Controls: The concept of custom controls can be extended to web applications allowing code reuse and modularization.
7. Web services: They are “web callable” functionality available via industry standards like HTTP, XML and SOAP.
8. Windows Services: They refer to applications that run as services in the background. They can be configured to start automatically when the system boots up.

Wednesday, May 2, 2012

Use Windows PowerShell to restore a farm


Use Windows PowerShell to restore a farm

You can easily restore the farm using Windows PowerShell. Please follow the below steps as shown below:

1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2010 Products.
3. Click SharePoint 2010 Management Shell.

4. To view the backups for the farm, type the following command:



Get-SPBackupHistory -Directory {BackupFolder} -ShowBackup [-Verbose]


5. At the windows PowerShell command prompt, type the following command:


Restore-SPFarm -Directory {BackupFolder} -RestoreMethod Overwrite [-BackupId ]

For More details : http://technet.microsoft.com/en-us/library/ee428311.aspx
 

Wednesday, April 18, 2012

Be nice to the people on the way up because you might meet them again on the way down!

Tuesday, March 27, 2012

Conditional Formatting in SharePoint 2010 using SharePoint Designer 2010


Conditional Formatting in SharePoint 2010 using SharePoint Designer 2010

We can do conditional formatting on both rows and columns.
The conditional formatting are usually takes the html formatting on the page level. So you have to design in the html format using SharePoint designer 2010.


The following are the steps to do Formatting Row/column:
  1. Open the site in SharePoint Designer.
  2. Right click the file, and make backup copy.
  3. Edit the file in advanced mode.
  4. Click on the grid page and then click on Conditional Formatting, available on the ribbon.
  5. Select Format row/column.
  6. Put the condition as per the requirement.
  7. Set the style, by clicking on the set style button
If you need to put image, do the following:
  1. Create the image using any image editor like Photoshop.
  2. And drop the image to the location 14 hive in SharePoint 2010 i.e., C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES
  3. And update the settings as shown in the below screenshot.







Monday, March 26, 2012

Key Points of SharePoint Designer 2010


Key Points: 


1.  SharePoint Designer is “the preferred” tool to design powerful no-code solutions and applications in SharePoint 2010.
2.    Use SharePoint Designer to produce solutions that are easily maintainable and supportable.
3.    SharePoint Designer is not a tool for general use by all those who visit or have access to a SharePoint site. The browser should be used to complete tasks such as adding static content (text, images, or hyperlinks) to Web pages, uploading documents, or creating and modifying list items.
4.    SharePoint Designer 2010 can be used only with SharePoint Foundation 2010 or SharePoint Server 2010 sites. These are server-based products and need to be installed prior to using SharePoint Designer 2010.
5.    SharePoint Designer 2010 cannot be used to customize non-SharePoint Web sites, nor can you use it to customize sites based on previous versions of SharePoint, such as Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007. Use Expression Web for non-SharePoint sites and SharePoint Designer 2007 with sites created in previous versions of SharePoint.
6.    SharePoint Designer can remember the last site you worked on and open it when you start the program. This is not the default configuration, but you can select this setting on the General tab of the Application Options dialog box. The Application Options dialog box can be opened by clicking Options in Backstage view.
7.  SharePoint Designer uses the security settings of your browser to decide whether to prompt for credentials.
8.    The SharePoint Designer shell consists of Backstage view and On Stage view. On Stage view consists of a number of elements, including the Quick Access Toolbar, ribbon, breadcrumb, Navigation pane, mini-gallery, workspace, task panes, and status bar. Web pages initially created in a SharePoint site point to files on a file system, known as uncustomized pages; however, when pages are customized by using SharePoint Designer, they are stored in the SQL Server databases, where they are known as customized pages.
9.    In SharePoint Designer 2010, uncustomized (site definition) pages can only be customized (unghosted) when a page is in advanced edit mode.
10. A SharePoint Web application consists of one or more site collections that contain one or more Web sites.
11. When a Web application is created, by default each site collection within that Web application can be modified using SharePoint Designer only by users who are members of the Site Owners and Designers site groups. However, these users cannot customize site definition pages, nor can they see the hidden URL structure of a SharePoint site.

 Source: Step by Step SharePoint Designer 2010 by Penelope Coventry 




Sunday, March 25, 2012

URL Naming convention in SharePoint 2010


URL Naming convention:
Check the spelling of words you include in the URL name and be consistent in your naming conventions; for example, don’t call a picture library pictures in one site and images in another. For some SharePoint components, such as the URL for a site, you cannot change the URL later.
If your aim is to make the URL readable and the URL consists of several words, use an underscore (“_”) in place of a space or remove the space and capitalize the first character in each word. For example, replace the three words Wide World Importers, with either Wide_World_Importers or WideWorldImporters. The underscore is the better of these options because all popular search engines and spiders understand it as a word separator.

Although the space character is a legal URL character, there are several issues with having one or more spaces in the URL, such as the following:

Readability: A space in the URL name is URL-encoded as %20, so the resulting name is difficult for people to read. A site with a URL of s p f would result in an encoded version of s%20p%20f, six extra characters.

URL length limitation: A URL must contain no more than 260 characters. SharePoint refers to every site, list, library, list item, or document as a URL. SharePoint prefixes the document name by the document library’s URL, which is prefixed by the site’s URL, then by its parent’s site’s URL, and so on. In addition, when a user edits documents or list items, SharePoint appends the URL of the document library or list, so that when the user clicks Save or Close, the browser redirects them to the list or library in which the item was saved. If the URL for the list or library contains two spaces, it contains six extra characters. Then, as the URL is appended for editing, that adds another six extra characters, making 12 extra characters. Therefore, if you consistently use long names, you’ll eventually have problems, which is exaggerated if you use spaces.

Links in e-mails: If you incorporate a URL in an e-mail message, some e-mail programs truncate the URL at the first space when sending the clickable link to the recipient, resulting in a broken link. When users click the link, they are taken to an invalid location in the browser and won’t understand why they can’t find the document.


Source: Step by Step SharePoint Designer 2010 by Penelope Coventry