Showing posts with label sharepoint. Show all posts
Showing posts with label sharepoint. Show all posts
Friday, March 8, 2013
Wednesday, September 9, 2009
What is Microsoft infopath 2007?
Recently I have gone through a good article and I want to share with you.It provides the complete information about microsoft infopath and how to use ?where to use?
http://www.learnthat.com/Software/learn/1375/Microsoft-Infopath-Tutorial-and/
http://www.dotnetspider.com/forum/222333-What-use-infopath-forms.aspx
Labels:
infopath,
microsoft infopath,
sharepoint
Wednesday, August 26, 2009
Deleting an item from sharepoint list
If you would like to delete an item from SPListItemCollection in share point,
Use the following code
SPSite site = null;
SPWeb web = null;
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
site = SPContext.Current.Site;
site.AllowUnsafeUpdates = true;
web = site.OpenWeb();
SPList list = web.Lists["Test"];
SPQuery oQuery = new SPQuery();
oQuery.Query = "" + txtGaugeID.Text + " ";
SPListItemCollection oDeleteCollection = list.GetItems(oQuery);
if (oDeleteCollection.Count > 0)
{
for (int i = oDeleteCollection.Count - 1; i > -1; i--)
{
oDeleteCollection.Delete(i);
}
}
});
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
Use the following code
SPSite site = null;
SPWeb web = null;
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
site = SPContext.Current.Site;
site.AllowUnsafeUpdates = true;
web = site.OpenWeb();
SPList list = web.Lists["Test"];
SPQuery oQuery = new SPQuery();
oQuery.Query = "
SPListItemCollection oDeleteCollection = list.GetItems(oQuery);
if (oDeleteCollection.Count > 0)
{
for (int i = oDeleteCollection.Count - 1; i > -1; i--)
{
oDeleteCollection.Delete(i);
}
}
});
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
Monday, July 27, 2009
Blocking anonymous users from sharepoint lists
To block the anonymous users from viewing the sharepoint lists add the following code in your web.config file
[CODE][location path="lists"]
[system.web]
[authorization]
[deny users="?"]
[/authorization]
[/SYSTEM.WEB]
[/location][/CODE}
[CODE][location path="lists"]
[system.web]
[authorization]
[deny users="?"]
[/authorization]
[/SYSTEM.WEB]
[/location][/CODE}
Labels:
anonymous,
anonymous users,
document libraries,
lists,
sharepoint
Friday, July 24, 2009
How to integrate outlook calendar items in sharepoint?
Just follow the following code to view your out look items in sharepoint.
To see the inbox items
//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'
To integrate the outlook calendar
//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'
use the '<>' instead of //
To see the inbox items
//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'
To integrate the outlook calendar
//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'
use the '<>' instead of //
Saturday, June 13, 2009
Reading data from sharepoint customlist
Here I explained a simple program for sharepoint beginners which states that reading a data from custom list and bind it to a dropdownlist.
first we have to add microsoft sharepoint dll to our application and import the following name space.
using Microsoft.SharePoint;
declare the following parameters globally.
SPSite objSite;
SPWeb oWeb;
SPList regList;
and bind the data like this
objSite = new SPSite(SPContext.Current.Site.ID);
oWeb = objSite.OpenWeb("/sitename/");
regList = oWeb.Lists["listname"];
SPListItemCollection oItems = regList.Items;
dt = new DataTable();
dt = oItems.GetDataTable();
ddlTypeCourses.DataSource = dt;
ddlTypeCourses.DataTextField = "Title";
ddlTypeCourses.DataValueField = "Title";
//ddlTypeCourses.Items.Add(new ListItem("-select-", "0"));
ddlTypeCourses.DataBind();
ddlTypeCourses.Items.Insert(0, new ListItem("---Select Course Types---", "0"));
Labels:
customlist,
dropdownlist,
sharepoint,
splist,
spsite,
wss3.0.sharepoint
Subscribe to:
Posts (Atom)
