SharePoint Client Object Model
To know sharepoint client object model please refer the below web link
http://www.codeproject.com/KB/sharepoint/SP2010ClientObjectModel.aspx
and one more MSDN link
To know sharepoint client object model please refer the below web link
http://www.codeproject.com/KB/sharepoint/SP2010ClientObjectModel.aspx
and one more MSDN link
Please go through the below steps >>>
Required files
Procedure:
<asp:Content id=”Content1″ runat=”Server” contentplaceholderid=”PlaceHolderMain”>
<script language=”javascript” type=”text/javascript” src=”http://192.168.1.137:5555/Shared%20Documents/SPAPI_Core.js“></script>
<script language=”javascript” type=”text/javascript” src=”http://192.168.1.137:5555/Shared%20Documents/SPAPI_Lists.js“></script>
<script language=”javascript” type=”text/javascript” src=”http://192.168.1.137:5555/Shared%20Documents/InsertItem.js“></script><table style=”font-family:Calibri;width:25%”>
<tr>
<td>
Title:
</td>
<td> <input type=”text” id=”txtTitle”></td>
</tr>
<tr><td>Department:</td>
<td><select id=”txtDepartment”>
<option value=”0″>Dept</option>
<option value=”1″>Dept1</option>
<option value=”2″>Dept2</option>
<option value=”3″>Dept3</option>
</select></td>
</tr><tr><td></td><td><button type=”submit” onclick=”AddEmployee();”>Insert</button></td></tr>
</table>
</asp:Content><asp:Content id=”Content2″ runat=”Server” contentplaceholderid=”PlaceHolderPageTitle”>
Insert Form
</asp:Content>
var strUrl=”http://win2003:5555/“;
var splists = new SPAPI_Lists(strUrl);
var spuser = new SPAPI_UserGroup(strUrl);function AddEmployee()
{
if(document.getElementById(“txtTitle”).value==”"||document.getElementById(“txtDepartment”).value==”")
{
if(document.getElementById(“txtTitle”).value==”")
{
alert(‘Employee name Required..’);
}
if(document.getElementById(“txtDepartment”).value==”")
{
alert(‘Department name Required..’);
}
}
else
{
InsertItem();
}
}function InsertItem()
{
var lists=new SPAPI_Lists(strUrl);
var empName=document.getElementById(“txtTitle”).value;
var department=document.getElementById(“txtDepartment”).value;
alert(“Employee Name:”+empName);
var batch=”<Batch PreCalc=’TRUE’ OnError=’Continue’><Method ID=’1′ Cmd=’New’><Field Name=’Title’>”+document.getElementById(“txtTitle”).value+”</Field><Field Name=’Department’ Type=’LookUp’ LookUpID=’True’>”+document.getElementById(‘txtDepartment’).value+”</Field></Method></Batch>”;
var res = lists.updateListItems(“Employee”,batch);
if(res.status==200)
{
alert(‘Record Saved Successfully’);
}
else
{
alert(res.responseText);
}
}
The below is the best MVP (Model View Presenter) pattern.
First Video
Second Video
Third Video
Fourth Video
Fifth Video
Please post your comments and extra links if you have knew..
I have found a good video tutorial for the custom theme in MOSS. Please go through the below videos.
First video
Second video
After visited this post please post your comments and any other stuff…
Using Visual studio create sequential work flow…
Please watch this below video.
http://www.microsoft.com/resources/msdn/en-us/office/media/MOSS2007CreateSeqWFUsingVS2008.wvx
To show the recent items in a sharepoint list we need to configure the view like below.
http://nickgrattan.wordpress.com/2007/09/06/showing-recent-items-in-a-sharepoint-view/
This error would occur if you have changed the password of the SharePoint server. Please change the password in application pool > Identity .
Reset IIS
To resolve the issue please refer the below weblink.
Error: Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
I got this above error even after I written the code in
SPSecurity.RunWithElevatedPrivileges(delegate()
{
—– CODE—-
});
Then I got solution from this below page
http://www.directsharepoint.com/2011/03/access-denied-error-while-using.html
Solution :
Write code as below
SPWeb web = SPContext.Current.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite elevatedSite = new SPSite(web.Site.ID))
{
SPWeb elevatedWeb = elevatedSite.OpenWeb(web.ID);
SPUser someUser = elevatedWeb.EnsureUser(web.CurrentUser.LoginName);
}
});
It will resolve the issue.