SharePointCafe Admin
Introduction to Angular JS.
.
What is Angular JS? Angular JS is Java Script framework introduced by Google in 2012 (version 1.0). It is an open source. Angular JS allows a developer to write a powerful client-side coding. To work with Angular JS just download angular js file from https://angularjs.org and reference it into your HTML, ASPX page. The first…
Upload a file using JQuery and Generic Handler in ASP.Net
.
In this blog we will learn how to use jquery and generic handler in asp.net to upload a file.I have used Jquery to call a generic handler to upload a file. In this blog I have written code which accepts jpg file only and file size should not exceed 10 MB.You may customize as per…
Data Contract in WCF
.
In my earlier blog, I wrote about Other Contracts. Please refer this link Contracts in WCF Learn Data Contract It is used to define the data which will be exchanged between client and server. A simple Data Contract with Data Member will look like this. [DataContract] public class Product { private int _ProductID; …
Create Datatable using .Net Client Context in SharePoint 2010
.
Create Data Table while using SharePoint 2010 Client Context with .Net Code I am using .net code to access SharePoint List.I created a method ExecuteSPQuery() which returns Data Table. For that I wrote below code. public static DataTable ExecuteSPQuery() { DataTable dtData = new DataTable(); Microsoft.SharePoint.Client.ListItemCollection listCollection = null; ClientContext context = new ClientContext(“SITE_URL”); try { Site oWebsite = context.Site; context.AuthenticationMode = ClientAuthenticationMode.Anonymous; List list =…
What is Operation Contract in WCF Service?
.
In my earlier blog I wrote about Contracts and Service Contract. Please refer this link Service Contract in WCF Operation Contract Operation Contracts are nothing but the functions or methods exposed to the client which may or may not return to perform some logic at server end. A simple Operation Contract with Service Contract will…
What is Service Contract in WCF?
.
Service Contract in WCF Contracts in WCF are very important. Contracts are responsible for how to communicate, what protocol to use and what message to send. Following contracts available in WCF: Service Contract Operation Contract Data Contract Message Contract Fault Contract We will see all contract one by one with the help of practical implementation…
WAS Hosting in WCF Service
.
As we all know that IIS 6 supports HTTP protocol only. Windows Process Activation Service (WAS) supports non-http protocols in IIS. So, WAS helps WCF service to host with HTTP and NO-HTTP protocols such as net.tcp. Once you changed binding in the config file to netTcpBinding Your service will throw this error. Don’t worry there…
Self Hosting a WCF service
.
As we know WCF supports various hosting options. Self Hosting is one of them. What is Self Hosting? WCF allows hosting a service in an application such as Console Application. Create a Console Application Project to host a WCF Service. Add WCF Service project Reference in this Console Application. Delete existing App.config file. Add new…
How to Host a WCF Service in IIS?
.
If you are new to WCF services then please read my earlier blogs. Go through with this link – WCF Tutorial step by step.WCF supports a various way to host a service. In this blog, I will explain about Hosting a WCF Service in IIS. How to host WCF service in IIS? Step 1: Create…
Introduction of JSON
.
What is JSON? JSON stands for JavaScript Object Notation. JSON is a data exchange format between javascript and server-side languages like JSP, ASP.NET etc. How to write data in JSON format ? Within the script tag, we write JSON data format. Benefit of using JSON JSON is a lightweight data exchange format built into Java…
SPQuery and SPSiteDataQuery in SharePoint
.
Before reading this blog, you may also like to know about CAML Query. You can know about CAML Query in details. In this blog, we will see SPQuery and SPSiteDataQuery. SPQuery and SPSiteDataQuery in SharePoint 2010 SPQuery – SPQuery can be used to query a single list. SPQuery query = new SPQuery(); SPSiteDataQuery –…
Important SQL Query asked in Interview
.
Important SQL Query asked in InterviewSQL query to check a record in table, if exist then insert else update the record. BEGIN IF EXISTS (SELECT * FROM [users] WHERE email=@email) UPDATE [users] SET updated_date = GETDATE() WHERE email=@emailELSE INSERT INTO [users] (uid,first_name,last_name,email,password,gender,is_active,reg_date) VALUES (NEWID(),@fname,@lname,@email,@password,@gender,1,GETDATE())ENDStored procedure to return id of last inserted record:@id int…
Attach existing Content Database to new SharePoint Site Collection
.
This blog will describe how to attach, detach a content database.Below is the scenario – You created a new Site collection in SharePoint 2010.Now you want this site collection to work with your existing Content database. Simply you can be asked that you have an existing content database and you need to attach it with…
What is JQuery Callback Function?
.
A call back function executed after the current event has completed. Java Script code executes line by line. However, if next line of code executes even before completing the action(s) which wrote in previous lines. This may create an error. To avoid this, we can create Callback function. JQuery Callback Function Syntax Syntax: $(selector).hide(speed,callback); To…
JQuery Events Methods
.
Like a programming language, a JQuery also has some events. JQuery event occurs on a web page when a user takes some actions like the mouse click, mouse scroll, check box selection etc. Below are some events. Mouse Events Keyboard Events Window Events Form Events Click Key press Load Submit Double Click Key down Scroll…
JQuery Selectors
.
JQuery selectors allow you to select and manipulate HTML elements. JQuery selectors find HTML elements based on id, name, attribute, classes etc. General syntax for JQuery selector is $()Ex: Element selector$(“p”) – select all p element on that page. ID selector $(“#txtUserName”) – select control with mention id. Class selector $(“.myclass”) – select control, html element which…
Master Page and Branding in SharePoint 2010
.
MasterPage and Branding in SharePoint What is branding? – Branding means to design or recreate a page for a site which may use SharePoint Master Page. What is Master Page? – Master Page gives a consistent layout through out the site. For eg – Header, Footer, Top Menu Why We need to do Branding ?…
What is new in SharePoint 2013?
.
SharePoint 2013 is the next version of SharePoint 2013. What’s new in SharePoint 2013? SharePoint 2013 gives more powerful features compare to SharePoint 2010. Few features are – SharePoint 2013 App Model Workflows with the introduction: a new, highly scalable workflow framework. User experience (UX) improvements. Sandbox Solution deprecated in SharePoint 2013 OOTB PDF support Web…
Display SharePoint List Items using ECMA Script – Client Object Model
.
Display SharePoint List Items using ECMA Script In this blog, I will explain, how to get list items using ECMA Script.ECMA script is a client side way to work with SharePoint object. Create a web part page in page library. Add a content editor web part on that page.In content editor webpart write below code:…
REST API in SharePoint 2010 for CRUD operation with ListData.svc
.
REST API in SharePoint 2010 for CRUD Operation SharePoint 2010 offers numerous ways to get data from a list. You may use Client Object Model, Linq to SharePoint and REST API by using ListData.svc. In this blog, I will explain how to perform CRUD operation on a SharePoint list using ListData.svcGenerally, SharePoint REST service URL…
