Introduction
Today, in this article let's play around with one of the interesting and most useful concepts in SharePoint 2010.
Question: What is ClientOMDelete?
In simple terms "To delete the data from client side environment for SharePoint applications, this is used".
Step 1: Open Visual Studio 2012 and select "ASP.Net Web Forms Application", as in:

Now two references need to be added to the application; they are:
-
Microsoft.SharePoint.Client
-
Microsoft.SharePoint.Client.Runtime
Step 2: The complete code of webform1.aspx looks like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ClientOMDeletion.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<center>
<div>
<table style="text-align: center">
<tr>
<td colspan="2">
<asp:Label ID="Label1" runat="server" Text="Client Object Model Deletion - SharePoint 2010 Programatically"
Font-Bold="true" Font-Size="Large" Font-Names="Verdana" ForeColor="Maroon"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label4" runat="server" Text="Please Enter List Name" Font-Size="Large"
Font-Names="Verdana" Font-Italic="true"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox4" runat="server" Width="117px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="Please Enter ID" Font-Size="Large" Font-Names="Verdana"
Font-Italic="true"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox5" runat="server" Width="117px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<br />
<asp:Button ID="Button1" runat="server" Text="Delete Data" Font-Names="Verdana" Width="282px"
BackColor="Orange" Font-Bold="True" OnClick="Button1_Click" />
</td>
</tr>
<tr>
<td colspan="2">
<br />
<asp:Label ID="Label5" runat="server" Font-Bold="true" Font-Names="Verdana"></asp:Label>
</td>
</tr>
</table>
</div>
</center>
</form>
</body>
</html>




Join the conversation! Your thoughts help the community grow.