This post was moved. Please refer the location:
http://sharepointquicksolutions.blogspot.in/2012/02/get-dateonly-from-caculate-date-in.html
http://sharepointquicksolutions.blogspot.in/2012/02/get-dateonly-from-caculate-date-in.html
|
SPSecurity.RunWithElevatedPrivileges(delegate())
{
using (SPWeb currentweb = new
SPSite(siteUrl).OpenWeb())
{
currentweb.AllowUnsafeUpdates = true;
SPList spList =
currentweb.Lists["Custom List Name"];
SPListItem spListItem = spList.Items.Add();
private SPWorkflowManager wfManager;
private SPWorkflowAssociationCollection
spWorkFlows;
// To replace the WF name globally
string WorkflowName
=ConfigurationManager.AppSettings["WorkflowName"].ToString();
wfManager =
spList.ParentWeb.Site.WorkflowManager;
spWorkFlows = spList.WorkflowAssociations;
foreach (SPWorkflowAssociation sendingWF in
spWorkFlows)
{
if (sendingWF.Name == WorkflowName.Trim())
{
spListItem.Update();
//To start Ninetex WF after updating Items in list
wfManager.StartWorkflow(spListItem,sendingWF,
sendingWF.AssociationData,
true);
break;
}
}
});
|
|
< PageParserPath>
//To allow
script code to the specific page
< PageParserPath
VirtualPath=”/Pages/Sample.aspx” CompilationMode=”Always”
AllowServerSideScript=”true” />
//To allow script code
to all the pages
< PageParserPath VirtualPath=”/Pages/*”
CompilationMode=”Always” AllowServerSideScript=”true” />
//To allow script code
to the Master page
< PageParserPath
VirtualPath=”/_catalogs/masterpage/Sample.master” CompilationMode=”Always”
AllowServerSideScript=”true” />
//To enable code
blocks on folder
< PageParserPath
VirtualPath=”/TeamSite/CustomForms/” CompilationMode=”Always”
AllowServerSideScript=”true” IncludeSubFolders="true"/>
< /PageParserPath>
|