.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

retentionXml param on SetRetentionSchedule()

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :SharePoint
My apologies if I'm reposting this.  I'm still trying to find an answer and I couldn't find my original post.... I need to set the retention schedule on a folder programmatically since I will need to do this for 500 users.  I've created a test case that functions correctly using the Sharepoint GUI, but I'm having some trouble setting the retention schedule since it's new in 2010 and there aren't any examples on the web yet. So my code creates a folder (among other things) and then i need to set a simple retention policy that simply kicks off a workflow after the passage of so much time.  The documentation for the method call is sparse and doesn't include any examples.  The retentionXml param is described as a valid xml fragment, again without any example.  I just need to know what this should look like for the method call.  Here's a code snippet... ...            Dim lp As New ListPolicySettings(mySPList)  lp.SetRetentionSchedule("myFolder", "xml fragament????", "my folder description")  lp.UseListPolicy = True Thanks

View Complete Post

More Related Resource Links

passing page title through a param


Hello all,

   I am new to ASP.NET, and was wondering how to pass a Page title through a parameter.  In classic ASP I could just use something like: <title><%=Pagetitle%></title> but I cannot seem to get this to work in ASP.NET. 

Thank you in advance,

The New Guy... Smile 

How can i send an input param of XML with more than 8K to a stored procedure in ADO?

 My sample SP : CREATE PROCEDURE MyINV   @sData AS XML  AS  BEGIN  SET NOCOUNT ON; select 1 as iTestCount  END The param sData is more than 8000 characters.  till 8000 bytes, it works .But throwing exception on 8001 bytes.   Code = 80040e21,Code meaning = IDispatch error #3105,Source = Microsoft OLE DB Provider for ODBC Drivers,Description = [Microsoft][ODBC SQL Server Driver]String data, right truncation   Im using VC++/ADO. _variant_t varChunk; varChunk = (char*)(sValue.GetBuffer()); pParam->AppendChunk(varChunk); pCommand->Parameters->Append(pParam); pCommand->Execute(...)  

How to pass param between two user controls?

Hello,I would like to convert some aspx code in user controls. This would lead me to having a master user control that contains other controls inside.The contained user controls have datasource with some control parameters that takes the value from a control present in the aspx (now) and that will then moved in the container user control.which is the best way to handle a scenario like this?thanks a lot

Session or Request in class without passing as param

I'd like to be able to reference the asp.net objects Session, Request, from a procedure without passing them in as parameters all the time. Is there a way to do this. For example, now I have namespace xx { public class ContextPT { public static string GetSession(System.Web.SessionState.HttpSessionState inSession) { StringBuilder sb = new StringBuilder(1000); string nameType; string value; foreach (string s in inSession.Keys) { nameType = s + " " + inSession[s].GetType().ToString(); value = inSession[s].ToString(); sb.AppendLine(nameType + ": " + value); // dataRow(new string[] {nameType, value}); } return sb.ToString(); } } } somewhere else this.lContext.Text = ContextPT.GetSession(Session); I'd like to call it like this "ContextPT.GetSession()" and have GetSession know how to find the Session object.  I know this does not seem like a big deal in this case, but I have reasons. 

How to expose an enum type to a client via WCF if it isn't used as a param type in any service oper

Hi,   I want to 'expose' an enum type from my server via WCF so that my client can access it. This happens automagically if I use the enum as a parameter type within a service operation, however, what if the particular enum isn't part of any service operation?   In other words, I've defined serveral enums within my Server that are quite useful to my client (even though they don't appear in any of my paramter declarations for the service operations).   The only way I can get this to work is simply create dummy service operations that contains these enum's as arguments. The MEX page then exposes these types for my client to use, but this seems a bit naff.   Thanks   Paul.

How to pass param type List<> to WCF service?

 I have a WCF Method likes this:public bool SaveStudents(List<Student> students) { //save to the database; return true; }[DataContract]public class Student{[DataMember]public string Name{get;set;}public string Major {get;set;}} At html page, i have a form allows create one more than a student at a time and save all student to database.I using jquery ajax call.Now, I don't how to pass data (in json format) so that SaveStudents can parse and understand json object from client and parse it to List<Student>Please help me!!!

Problem setting variable/param in XSLT for XML control in .NET 4.0

I am using an XML control in VS2010 with .NET 4.0.I am trying to sort XML data into a table. I have a drop list with the sort key, and a button that is supposed to display the table with a new sort.Here is the code the button calls:</p><p></p><p style="text-align: left;" mce_style="text-align: left;"><font class="Apple-style-span" face="Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace"><span class="Apple-style-span" style="border-collapse: collapse; line-height: 13px;" mce_style="border-collapse: collapse; line-height: 13px;" mce_fixed="1"></span></font></p><p><font class="Apple-style-span" face="Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace"></font></p><p><font class="Apple-style-span" face="Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace"><div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">private void PopulateXML( Xml MyXML)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: h

Report Prompts for Param Values when pageing

Could somone help:  I have created a CR which uses two static parameter fields for 'DateFrom' and 'DateTo' on the report.  The parameters are passed to the web page via a query string, and then I use Dim Fromdate As String = Request.QueryString("from") etc to send the parameter via code.  The problem I'm having is this.  The DateFrom and DateTo values are being sent to the report ( I simply use them in the report header to display the from and to dates selected by the user for the report ) and the report display's as expected.  But when you click 'Next' in the multipage report, the report prompts with a parameter popup box to reenter the dates.  Once you enter the values, you can page back and forth without any more interuptions.  Would anyone know what I have set wrong?  Here is the code that I use to populat the report.Dim reportpath As String = ""        reportpath = Server.MapPath("myreport.rpt")        Dim Fromdate As String = Request.QueryString("from")        Dim Todate As String = Request.QueryString("to")        Dim crParameterDiscreteValue As ParameterDiscreteValue        Dim

create a temp table using a name passed as a param


I am trying to move VB script to sql server and I am not sure how to do this one:

create proc CreateTable(tempTable as varchar(50)

SET @TempTble = 'tempdb..' + @tempTble

IF object_id(@TempTble ) IS NULL
  CREATE TABLE @tempTble
   id INT, fldName NVARCHAR(255), Balance FLOAT, 
   SName NVARCHAR(100), eventDate Datetime

ADF file, SpecificFinder using In param from different entity


<TypeDescriptor TypeName="System.Int32" IdentifierEntityName="X" IdentifierName="Something" Name="Something"/>

If the above statement is in a method inside of entity Y, how come sharepoint generates an error?


"Application definition import failed [...] does not match any of the defined Identifiers for the Entity. 


What I'm trying to do is in entity Y, I'm trying to have a SpecificFinder method that uses a parameter ("Something") from entity X. In other words, the "In" parameter in entity Y, specificfinder method has a "variable" from entity X. Why is this not working?

Report viewer control is is displaying parameter item 'select a value' even when the default param



I am using SSRS 2008 R2,

I have set the default parameter of dropdown and in the output "select a value" item text is removed ,also in the Report Manager 'select a value' removed .

But when I am displaying the same reports in the ReportViewer control as ReportViewer1.ServerReport  in the the vs 2010 asp.net project the item select a value is reappearing in the output.

Could you please help me remove the default item text 'select a value' from the ReportViewer control aswel.











ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend