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


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

SPList.WorkflowManager.StartWorkflow(SPItem item, SPWorkflowAssociation association, string initiati

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :SharePoint
 
I want to know initiationData Data format in this method  please help me .I want send some integer to workflow but I dont know initiation data format.??


View Complete Post


More Related Resource Links

site.Workflowmanager.StartWorkflow with elevated privileges

  

I've found this link describing the same problem I got although this article might be related to SharePoint 2007. So after creating a WorkflowAssocciation and adding it to a docLib I'm trying to start the workflow with this code (everything happens programmatically):

SPSecurity.RunWithElevatedPrivileges(delegate
{
  using (SPSite site = new SPSite(SPContext.Current.Site.ID))
  {
    using (SPWeb web = site.OpenWeb())
    {
      foreach (SPListItem item in MyListItems)
      {
        web.AllowUnsafeUpdates = true;

        web.Site.WorkflowManager.StartWorkflow(item, myAssociation, myAssociation.AssociationData);

        web.AllowUnsafeUpdates = false;
      }
    }
  }
});

This is the stacktrace for the errormessage "

site.Workflowmanager.StartWorkflow with elevated privileges

  

I've found this link describing the same problem I got although this article might be related to SharePoint 2007. So after creating a WorkflowAssocciation and adding it to a docLib I'm trying to start the workflow with this code (everything happens programmatically):

SPSecurity.RunWithElevatedPrivileges(delegate
{
  using (SPSite site = new SPSite(SPContext.Current.Site.ID))
  {
    using (SPWeb web = site.OpenWeb())
    {
      foreach (SPListItem item in MyListItems)
      {
        web.AllowUnsafeUpdates = true;

        web.Site.WorkflowManager.StartWorkflow(item, myAssociation, myAssociation.AssociationData);

        web.AllowUnsafeUpdates = false;
      }
    }
  }
});

This is the stacktrace for the errormessage "

Workflow create item returning integer... Should be a string.

  

Hi.

 

Im passsing information to a new item in a different list using the create item workflow.

 

It seems to work from apart from one, critical field. The create item should (i hope) pass a valie from a field  'FIELD' in List A to 'FIELD' in ListB.   in list a the field is a lookup from a reference list.

The create new List item workflow ____ it but only returns the type as an integer (an its the oonly option) .

Can you explain where im going wrong?

Thanks.


Move Splist Item from one list to another list

  

Hi,

I am moving the splist items from one web to another web using Export and Import. targeting list is creating with source list Template. And Lookup columns are deleting and created with same name. But while moving it creating lookupcolumn with sane name and internal name as lookupname+"0". 

Both lookup columns are not updating. If lookup column not created then it creating and updating but showing sorce list lookup list hyp link.

 

Plrease guide me in rif=ght direction

 

With Best regards,

 

Thippa Reddy Musturu.


Search string (in txt file) --> Get the string between quotes which comes after it --> Add item in l

  

Hello :)

I've mentioned my complete objective in the title.

I already know how to find a string, and add a item in listbox.
But so far I kept failing at retreiving the string between the quotes

My txt file looks like this:

_______________________________
List of delicious fruits ( Index 1 "Apple") ( Index 2 "Cherry") ( Index 3 "Banana") (...) (...)
_______________________________

The listbox has to view this :

_________
Apple Cherry Banana
_________

This is how far I got.

public void fruitFinderBlock()
{
 StreamReader reader = new StreamReader(@"C:\TEST.txt");
 string content = reader.ReadToEnd();
 
 while (content != null) // while not at end of file
 {
 string Find = "Index";
 if (content == Find)
 {
 string fruitname;

 // TODO assign fruitname to the string between the quotes 

How to Encrypt Query String Parameters in ASP.NET

  
Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

Connestion string create any database server

  
This links important to how to create connection string to any data base sever.

SQL Connection String

  
We can learn or know how can we connect the database from our .net. This will help for freshers or .NET beginners!

Built-in Functions - String Functions

  
String functions let you extract various portions of character strings, change the case of strings, concatenate and reverse strings and perform many other types of manipulations. All built-in string functions are deterministic with the exception of CHARINDEX and PATINDEX

abstract away the source of the connection string using a class with a static property.

  
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Encapsulation
Let's abstract away the source of the connection string using a class with a static property.

highlight string

  

i am looking for a function that takes two string parameters 

str1 = "hello how are you today mr john"

str2 = "how today"


and in return it shoud highlight the words "how" and "today".


Any ides? I prefer if its possible using reg expression...Thanks


Could some one tell me whats the Problem with this String Manipulation ??? C#.net

  

Hi.,

I store some values from code behind to a label which is Hidden !

<asp:Label ID="lbl_Hidden" runat="server" Visible = "false"></asp:Label>

and at the page load event i retrieve the value of the label & assign it to a string !

stringvalue = lbl_Hidden.Text;

Now i dont know why this manipulation does'nt work !

I've a character 'A' in the string and i'm unable to replace it with a space !

stringvalue.Replace(A, " ");

Wot do u think abt it ????


extract picture data from a string

  

dears,advance thanks.can anybdy help to solve my problem which is describing below.


Example- %%D1,100,0,0004[data...][0d0a]

Head - %%D1
Amount of data package -100
The data package No. - 0
Data Length -1024 (0004 (low bit in front, high bit in back) 0004= 0x0400=1024;)

data- Original Picture data -1024(maximum)
Tail -0x0d0a
Data in hex

from the above example i want to extract picture data and need to store in to the sql table.sql table columname is image and datatype is also image.after that i wanted to display this image column to an aspx page.

expecting help asap.


Missing 'new item templates'

  

 Hi all,

          I am a 'newbie' to VWD and I am slowly working through the Basic Walkthrough Help files, and learning plenty along the way.

However, when I tried to create a new database in the LINQ control walkthrough I found that the option to create a new database is missing, and further investigation has found that many other new item templates are missing.

I am using a brand new machine with Windows 7 Ultimate and have enabled IIS and .NET from Control Panel-Programs-Turn Windows Features On-Off. I used the WPI to install all basic elements eg. IIS Components, SQL Server Express.

The only 'new item templates' I have when I right-click the App_Data Folder and choose 'new item' are:-

ADO.NET Data Service

AJAX Enabled WCF Service

Dynamic Data Field

SQL Server Database

Text File

XML File

Does anyone know where I have gone wrong.

 

Michael J. Hill


connection string question from a newbie

  

when publishing  in the webmatrix dialogue it asks for "destination connection string" for my "database.mdf"

I was not sure what it was so I pasted this from my web.config file :

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True

it all published ok, but wont run, so I guess it has somthing to do with this connection string or some kind of configuration issue.

My question is this, What should go in the field for "Destination connection string"


WebMatrix conversion failed when converting from a character string to uniqueidentifier?

  

I am trying to retrieve xml from a small function in my .cshtml page. Its throwing me an error. This however, runs fine in a console/form environment.

It takes 3 parameters and 1 exception.

myDll.GetXML(year, username, uniqueidentifier, out ex);

When I run this page I get the error, "Conversion failed when converting from a character string to uniqueidentifier."

Or a stack of.

System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting from a character string to uniqueidentifier.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   at System.Data.SqlClient.SqlDataReader.get_MetaData()

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBeha

Membership Provider Conn String

  

Hello. I've bee successfully using the Asp.Net Membership Provider in my VB.Net 3.5/SQL 2005 web app for a year now (Site A). However, I've added 2 new sites (B and C) (both with their own DB) and now I see a problem. It looks like users that get created for sites B and C also get created in site A. Roles that I create for B and C only get created in A. I think it is a conn string problem.

When I created A, I adde the conn string to my machine.config (not sure why I did this or if it is even needed)...

MACHINE.CONFIG

<connectionStrings>
         <add name="LocalSqlServer" connectionString="Data Source=VS689\SQLEXPRESS;Initial Catalog=SiteA;USER ID=sa;PASSWORD=123456"/>
</connectionStrings>

In my WEB.CONFIG

<membership>
            <providers>
                <clear/>
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=blahblah" connectionStringName="LocalSqlS

Categories: 
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