Posts

About CAML in Sharepoint?

What is CAML in Sharepoint? CAML is Collaborative Application Markup Language and is an XML-based query language that is used in SharePoint. CAML is used to querying, build and customize the SharePoint sites. Writing CAML Query CAML root element is < Query >. CAML query has 2 parts 1.        Sort   (For sorting use <OrderBy>)   2.         Filter   (For filter use <Where>)  Basic syntax for CAML query < [Operator]>               <FieldRef Name=’ [Title]’/><Value Type=’ [Data Type] ‘> [Value] </Value> </ [Operator]>  Operators in CAML   Logical Operators                 And                 Or Comparison Operators Eq =Equals Neq =Not equal Gt=Greater than Geq =Greater than or equal Lt =Lower than Leq =Lower than or equal too IsNull = is null IsNotNull = is not null BeginsWith=Begins with Contains=Contains BeginsWith = begins with DateRangesOverlap= compare the dates In= value of a li

Automatically Jquery close alert /dialog box

Automatically Jquery close alert /dialog box  //Add below html code into body < div id ="dialog1" title ="Alert Message" style =" display :none">     < asp : Label ID ="lblMessage" runat ="server" Text ="Record Inserted Successfully"></ asp : Label > </ div > //add below code into head < script type ="text/javascript">         function DisplayPOP() {             var mydiv = $( '#dialog1' );             mydiv.css( 'display' , 'block' );             mydiv.dialog({ autoOpen: false , height: 20, width: 300 });             mydiv.dialog( 'open' );             //send the time             AutoCloseDialogBox(3000);             return false ;         }         function AutoCloseDialogBox(WaitSeconds) {             setTimeout( function () { $( "#dialog1" ).dialog( "close" ); }, WaitSeconds

How to Encrypt and Decript web.config connection string?

How to Encrypt and Decript  web.config connection string? web.config <connectionStrings>    <add name="connection" connectionString="data source=localhost;initial catalog=test;uid=sa;pwd=abcxyz"   providerName="System.Data.SqlClient" />  </connectionStrings> Add Two Button Encrypt and Decript  in asp.net and  write the code such as    protected void btnEncript_Click(object sender, EventArgs e)     {         Configuration config = WebConfigurationManager.OpenMappedWebConfiguration(GetWebConfigMappedPath(), "/");         ConfigurationSection appSetting = config.GetSection("connectionStrings");         appSetting.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");         config.Save();       }     protected void btnDecript_Click(object sender, EventArgs e)     {         Configuration config = WebConfigurationManager.OpenMappedWebConfiguration(GetWebConfigMappedPath(), "/"

SharePoint 2007 Object Model

SharePoint 2007 Object Model Through SharePoint object model programmatically access the SharePoint data into asp.net or any other server process. To access the SharePoint data we need to add SharePoint Microsoft.SharePoint.dll which is found under   <Installed Drive>:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\ SharePoint object model grouped in two categories: 1. Server Architecture 2. Site Architecture Server Architecture Object Model : The server architecture object model access “Microsoft.SharePoint.Administration” Namespace 1.         1. Farm a.         SPFarm 2.         2. Server a.         SPServer 3.         3. Services a.         SPServices 4.         4. Web Service a.         SPWebService 5.         5. Database Service Instance a.         SPServiceInstance b.         SPDatabaseServiceInstance 6.         6. Web Applications a.         SPWebApplication b.         SPAdministrationWebApp

Comparing cursor vs. WHILE loop performance

Cursors Cursors are a looping construct built inside the database engine and come with a wide variety of features. Cursors allow you to fetch a set of data, loop through each record, and modify the values as necessary; then, you can easily assign these values to variables and perform processing on these values. Depending on the type of cursor you request, you can even fetch records that you’ve previously fetched. Because a cursor is an actual object inside the database engine, there is a little overhead involved in creating the cursor and destroying it. Also, a majority of cursor operations occur in tempdb, so a heavily used tempdb will be even more overloaded with the use of cursors. The types of cursors used are very important in terms of performance. Below is a list of the available cursor types as listed on     FORWARD_ONLY Specifies that the cursor can only be scrolled from the first to the last row. FETCH NEXT is the only supported fetch option. If FORWARD_O