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

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

Need help determining the last step completed

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :ASP.Net


I have wizards in my app and when the user clicks one, the first thing I check is the "progress status" of the wizard for that user in case he/she has already started the process but never completed it. However, there's always a possibility that he/she might have completed 2 steps in a 5 step wizard.

I read the progress data into a simple List<WizardProgress> which looks like this:

StepID - CompletionDate
1 -- 12/1/2010 18:52:00
2 -- 12/2/2010 18:53:00
3 -- NULL
4 -- NULL
5 -- NULL

What is the best way for me to find the last completed step? It's easy enough to do a foreach but was wondering if there was a better way to do it.

View Complete Post

More Related Resource Links

How do you prevent a workflow from reaching the completed stage before it executes the workflow step


We designed a 7-step approval workflow in SPD 2007. Each step requires that two conditions be met before sending an email to the workflow participant. If the participant approves, the next participant receives an email, and so on. In the event of a rejection, the previous participant receives an email asking him/her to correct the problem and then approve.

What's truly frustrating is we know the workflow works because it executes perfectly the first time. Each participant is notified; approvals keep the workflow moving; the last step completes the workflow; and, most importantly, there is a workflow history documenting each step. However, when we test the workflow a second time (and each time after that), it races through to the Completed stage without generating emails or creating a workflow history. It's almost as if the workflow is somehow firing off the status of the prior workflow.

Since this workflow is running on a client's server, we have no way of know if the server cache is somehow causing the workflow to behave this way. And is that even a possible cause?

Some background facts: we created a SharePoint form library by publishing an InfoPath 2007 form. The approver names are contained in a combo-box control. The data sources are external XML files and SharePoint lists. We are also using the GetUserProfileByName data to populate the curren

Returning a DataSet From a Web Services: Step-by-Step

This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.


This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.

Security Briefs: Step-by-Step Guide to InfoCard


In my April 2006 column I began a discussion of InfoCard, the upcoming identity metasystem, which is being prepared for release in the Windows VistaT timeframe. If you haven't read that column, you should definitely start there because I'm going to assume you're familiar with the basics I covered.

Keith Brown

MSDN Magazine May 2006

Test Run: Determining .NET Assembly and Method References


Before you can test any software system effectively, you must understand the system under test. If the system includes the Microsoft® . NET Framework, understanding the system under test includes understanding its assembly and method dependencies.

James McCaffrey

MSDN Magazine March 2006

The ASP Column: Determining Browser Capabilities in ASP.NET


Web applications are different from applications that run in homogenous environments because they send their output to all kinds of platforms and Web browsers. Some browsers support client-side scripting, some support XHTML, and still others have limited screen real estate.

George Shepherd

MSDN Magazine January 2005

"Your search cannot be completed because of a service error. Try ..."


i have a problem with search function where everytime i search any file/doc the error message "Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information." occurred. I realized that there are items in central admin but it is "not available" in my site. I already follow several guides that had been provided in this forum but still the same. Even, i already create new SSP and configure the search scope, content source and also crawling. 

FYI, i used Microsoft Sharepoint 2007. 

Hope anyone could help me to solve this problem. Thanks.

How to determine when the cube refresh has completed?

I'm trying run code after a cube refresh is completed, but I can't seem to figure out how to write code to determine when the cube refresh has been completed. If it were a simple calculation, I could use the code below to determine the "calculation state", but there doesn't seem to be "refresh state" that I'm aware of. Any help will be GREATLY appreciated!! Application.CalculationState = xlDone

Determining the status os the Batch job that process SSAS Cubes

Hi All, I have a cube and that is processed through a batch job. The problem I am facing is there are many packages which are calling this Batch job to process the cube. Is there a way to determine the state of the job before the packages call this batch job to process the cube. And in which database can I find all the information about the jobs on the server. Thanks for your help. Vineeshvineesh1701

Steps by Step document for configuration Merge Replication in 2005

Hi , Can anyone provide link to configure Merge Replication in 2005 with print screen.Also let me know the difference between Transcation level and Merge Replication. regards Vijay  

determining path to aspnet_regiis

I am trying to invoke aspnet_regiis from c# code. I cannot find the path. Some say it should be in C:\Program Files\Microsoft.NET\Framework\... directory. But on my PC it is located in C:\Program Files\Microsoft Visual Studio 9.0\VC. I do not want to hard code the path to the aspnet_regiis location on the host. Instead I want to programmatically determine the path. Is there a way I can invoke registry or some environment variable to get the path to aspnet_regiis. Also once path is obtained, I want to export my security key container by invoking the following command. Can someone please look at this and tell me how to get this done? string path_to_aspnet_regiis; // Get the path_to_aspnet_regiis- I don't know how to do this. string args = " -pa " + KeyContainerName + " NT AUTHORITY\\NETWORK SERVICE"; ProcessStartInfo psi = new ProcessStartInfo(path_to_aspnet_regiis) psi.WindowStyle = ProcessWindowStyle.Hidden; psi.UseShellExecute = false; psi.RedirectStandardOutput = true; psi.RedirectStandardError = true; System.Diagnostics.Process process = new System.Diagnostics.Process(); psi.Arguments = args; process.StartInfo = psi; process.Start(); process.WaitForExit();

Error in Step 8 of Share point configuration wizard

HI Team,        I am getting an error in step 8 of Share point Configuration wizard, Its running for ever its running in the step 8 for ever later i need to kill the configuration wizard Please advise Thanks Kumar

Force SQL job to succeed even after a step fails in SQL server 2008

All, We are trying to force some jobs to succed even though one step in the job fails randomly. Now,we choose the property of the job succeed on failure, it still shows up as warning. How do we ignore the warning thrown by the job SQL job?? Any suggestions??   Thanks Kay

Need step-by-step Custom Template Help

I would like to create 5 custom templates and deploy the same ones to all 13 site collections (living under one web app). Here's what I can successfully do: 1. Create a site 2. Turn off features (on a hunch after experiencing the below problems) 3. Add branding, web parts, etc. 4. Site Settings -> Save Site as Template 5. Test by immediately creating a site in the same site collection with the template (this works). However: * Weeks to months after creating the template, it stops working (in the same site collection). Could be something I'm configuring, I don't know. Users get message "The template you have chosen is invalid or cannot be found." * If I go to the template gallery, right-click and save-as,  put the template on my desktop, and then upload it to another site collection, it doesn't work in the new site collection. Again, "The template you have chosen is invalid or cannot be found." When I open the template and look at the code, I see references to absolute URLs from the site where the template was created. Would really prefer to deploy these templates without coding. * If I use stsadm -o addtemplate -filename "filename.stp" -title "title" the template also doesn't work. It allows me to create a site with it and set permissions, but then I immediately get: Server Error in '/' Application. The resource cannot be

SQL Job Running the Upgrade Step, but the Step Fails

I have reviewed the following thread (http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/1c06be77-3fa9-42d8-9803-6649be65afd6), but I do not think it applies to my case, b/c I have no other processes running, except the RESTORE DATABASE process. In SSMS, when I EXEC spCent, the user-defined stored procedure runs successfully. When the same SQL command is executed from a SQL Job, the job fails, and job history is like the following: Message: Executed as user: NT AUTHORITY\NETWORK SERVICE. ...on file 1. [SQLSTATE 01000] (Message 4035) Processed 1 pages for database 'Cent', file 'Cent_log' on file 1. [SQLSTATE 01000] (Message 4035) Converting database 'Cent' from version 611 to the current version 655. [SQLSTATE 01000] (Message 944)  Database 'Cent' running the upgrade step from version 611 to version 621. [SQLSTATE 01000] (Message 951)  Database 'Cent' running the upgrade step from version 621 to version 622.     .     .     . [SQLSTATE 01000] (Message 951)  Database 'Cent' running the upgrade step from version 652 to version 653. [SQLSTATE 01000] (Message 951)  Database 'Cent' running the upgrade step from vers...  The step failed. As mentioned above, the stored proc can be successfully executed from within SSMS. The stored proc looks like this: ALTER PROCEDURE [dbo].[sp

MergeContentDbs Error: : This SqlTransaction has completed; it is no longer usable

I am running a MOSS 2007 farm with a large (378 GB) content database. I am running through various splitting scenarios so that I have multiple Db's instead of just one large one.  Using mergecontentdb's works fine for site collections up to 2GB, but any site collection larger gets the following error: : This SqlTransaction has completed; it is no longer usable.   After that, the site is no longer browseable.  Fortunately this is my test bed, but it does not bode well for splitting up the larger site collections.   Any help is greatly appreciated.   DaleDale

processing measure group : memory error : the operation cannot be completed because the memory quota

Hi, I'm stucked with this problem. Untill last week, the cube processed without any problem. Since last week, I'm getting this error. I have been searching in different forums, and I tried some suggestions, like changing memory limit properties, ... It is getting worse.. So I reset all properties to default again. I am running SQL-Server + MS-AS 2005 SP2 on server with 4GB of memory. This is a dedicated server, nothing else is running on it. The fact table has +/- 14 million records, several dimensions en 2 measure groups. I don't have problems to process the dimensions, but when I try to process the cube or the measure groups of that cube separately , the error persists. I have changed the datasource view, and replaced the fact table by a Named query. Even when I put a 'WHERE datapart( year , fact_date ) >= 2009 ' clause to reduce the number of records to +/- 5 million, I'm still getting the error. I don't understand what is wrong, the cube always processed since +/- 2 years. As I said, I have found a lot of this kind of Issues on different websites, I have been trying to change some properties. But this still does not solve the problem. Could it be that MS-AS settings are corrupt somewhere ? Is it a good idea to re-install MS-AS 2005 + SP1 + SP2 ? Or is there another reason possible ? I really appreciate any kind of help, because I'm

Custom Ribbon action using quick step for workflow

I created custom button using the quick step in ribbon, and configured to invoke a workflow. It shows start and stop page of workflow where I have to click start. How to start workflow directly from the ribbon without this redirection to page.  
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