.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

DynamicActivity.Implementation to ActivityBuilder.Implementaiton

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JQuery

As we know that DynamicActivity.Implementaion return Func<System.Activities.Activity> and ActivityBuilder.Implementation returns System.Activities.Activity.

So can we get System.Activities.Activity from Func<System.Activities.Activity> and assign it to ActivityBuilder.Implementaion somehow?




Software Engineer

View Complete Post

More Related Resource Links

ActivityBuilder or DynamicActivity for authoring workflow using imperative code


Hi all, 

I'm currently investigating what's the best way to author a workflow using imperative code. I found this link :


but, I'm still curious, which one is better as the main ingredient to author workflow using imperative code, is it ActivityBuilder or DynamicActivity?

The requirement is to write a workflow but we don't need it to be a type. We want to execute the created workflow, as well as perform modification (using code) such as adding/deleting argument, modify the variable, add/delete the sequence etc.

What are the differences between ActivityBuilder and DynamicActivity?


Converting DynamicActivity into ActivityBuilder


How can we convert DynamicActivity To ActivityBuilder class?

Please advice.

Software Engineer

jQuery Date picker Implementation in ASP.NET

I've posted a wrapper ASP.NET around the jQuery.UI Datepickercontrol. This small client side calendar control is compact, looks nice and is very easy to use and I've added it some time back to my control library.

This is primarily an update for the jQuery.ui version, and so I spend a few hours or so cleaning it up which wasn't as easy as it could have been since the API has changed quite drastically from Marc's original implementation. The biggest changes have to do with the theming integration and the resulting explosion of related resources.

If you want to use this component you can check it out a sample and the code here:

RSS implementation code - need suggestion


Please suggest what is the best approach of coding for RSS implementation,


Implementation 1:

a) Add custom handler in web.config for .rss type

b) Create a handler class (RSSHandler.cs) in APP_Code

c) Create a Sample.rss file

d) Browse Sample.rss in browser

 Technical Solution:Utility Classes:I)                   

Debug implementation of URLrewriter.net



After some googling and help from the forum, I have integrated the the URLrewrting.net in my project. There are no error when I build the project, but the URL rewriting does not work. I am able to figure ot where the problem is. Is there a way to debug this. The code is as below:

 Web.config file

<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.W

.NET Remoting: Create a Custom Marshaling Implementation Using .NET Remoting and COM Interop


The .NET Framework offers several methods for customizing the presentation of native .NET and COM object types. One such technique, custom marshaling, refers to the notion of specializing object type presentations. There are times, like when a legacy COM component needs to implement a new interface or when you need to make calls across process or machine boundaries, when custom marshaling saves the day. Elements of COM Interop permit the customizing of COM types while .NET Remoting offers the developer the ability to tailor native .NET types. This article examines these techniques.

Jim Sievert

MSDN Magazine September 2003

Rotor: Shared Source CLI Provides Source Code for a FreeBSD Implementation of .NET


With over 9,000 files, and including some 1300 public classes to pore through, the Shared Source CLI can teach you quite a bit about the internal workings of the CLR. But the sheer amount of source code included can make just starting your exploration a monumental task. This article discusses some of the things you can learn from the source code facsimile of the CLR, like how JIT compilation works. It will also help you understand how to control execution along with debugging and loading classes. A walk through the steps involved in setting up the runtime will let you become familiar with the process.

Jason Whittington

MSDN Magazine July 2002

Prevent Concurrent Logins ? [ Already logged in or currest session is still active implementation] ?


Hi Experts ,

I searched over the web but no luck so far and thought of getting some help form gurus .

Did any out really implemented a way to handle concurrent logins ?

Please not that i'm no using either forms authentication or Roles/Memberships , I do have custom authentication for my website .

I'm sure it is someway related  with global.asax file handling something in application events and session events but unable to figure this one out .

Any pointers will highly be valued and appreciated .

Thanks a tonne in advance .

Implementation of Audit Fields and optimistic concurrency

What is the best way to implement Optimistic concurrency? Also, I have 4 audit columns in every table in my database. They are created date, updated date, created by, updated by. Application should populate these fields. I want to know how to populate created date , and updated date? From where application datetime or database datetime? On save button click, if I have to save data into 4 different tables, then I need to have same datetime in all 4 audit fields correct? What is the best way to implement this? What will be the design? Please let me know.  

regex split implementation

hi I have created a function to implement the regex.split in sql. Here's my code: private static IEnumerable<IndexedValue<T>> ToIndexedValue<T>(IEnumerable<T> list) { int idx = 1; foreach (T value in list) yield return new IndexedValue<T>(++idx, value); } private struct IndexedValue<T> { public int Index; public T Value; public IndexedValue(int index, T value) { Index = index; Value = value; } } [SqlFunction(FillRowMethodName = "FillSplit", TableDefinition = "[ID] int, [Value] nvarchar(max)")] public static IEnumerable RegexSplit(SqlString input, SqlString pattern) { if (input.IsNull) input = String.Empty; if (pattern.IsNull) pattern = String.Empty; try { return ToIndexedValue<string>(Regex.Split(input.Value, pattern.Value, Options)); } catch { throw; } } public static void FillSplit(object obj, out int id, out SqlString value) { IndexedValue<string> iv = (IndexedValue<string>)obj; id = iv.Index; value = iv.Value; } However when i try it i get id values but empty text values. Can someone help?

How to get XAML to reconize my user control implementation?

Let say I want to implement a Singleton pattern for a UserControl as shown below.  How would I get XAML to be able to use this in Markup?    public class UserControlViewBase : UserControl     {         private UserControl _instance;         public UserControl getInstance() {               if (_instance == null) {                  //use reflection to instantiate based on callers type                 //get assembly name.                 Assembly asm = Assembly.GetExecutingAssembly();                 string classname = "View2";                 object o = asm.CreateInstance(classname);    &nbs

General Coding Standards Implementation?

Hello Friends, I had been struggling lot while the implementation of the general coding standards and i also want to know its compatibility with standard C and POSIX?   Thanks: Alfred  

How to set InArguments for DynamicActivity?

Hi. I'm trying to schedule DynamicActivity in my custom activity inherited from NativeActivity. This DymanicActivity is loaded from XAML. I need to set values for its InArguments. All what I can do is: protected override void Execute(NativeActivityContext context) { object inArgExpression = new Literal<string> { Value = someInArgument.Get(context) }; (dynamicActivity.Properties["someInArgument"].Value as InArgument).Expression = inArgExpression as ActivityWithResult; context.ScheduleActivity(dynamicActivity); } but it works only if I know type of InArgument and can choose a corresponding expression type. Unfortunatly it's not what I need. I have trying to use ArgumentToExpressionConverter but it always returns null. And I'm not sure that it is corretly to use it here. Is there another way to set InArguments of DynamicActivity (WorkflowInvoker is not an option)? Thanks a lot.

ICommand implementation : Toggling a whole GroupBox's visibilty (MVVM)

Hi, I have started writing my own custom Command classes by implementing the ICommand interface. So far, it works like a charm when I bind them to Buttons. It's a good thing to let the CommandManager do the work of checking each of my command predicates to toggle a button's visibility, but, what if I want to toggle a whole UI region (like a GroupBox) depending on specific conditions ? A clear example is a GroupBox with a ProgressBar which Visibility is "Collapsed" by default and that I want to be Visible only when the user has completed the minimum requirements on the View. Acutally, I have written a ICommand that verifies if the user has entered all the minimum requirements (selecting at least an item in each of the three ListBox and has entered a valid path in a Textbox. I have bound that ICommand to a Button (which I have called ExportButton). So, when all the requirements have been approved by the ICommand, the Button's visibility toggles to Visible and the user can "Export". My question is : How can I toggle the "Exportation GroupBox"'s Visibility (the GroupBox that contains the ProgressBar) from "Collapsed" to "Visible" when the user has clicked the Export Button ? Of course I could just do it from the Button's Click event in code-behind. In respect to MVVM, I'd like to keep my codebehind file as clea

Advice needed on backup strategy and implementation

This is my plan: Full database backup is performed at 5AM every day. Then log backups are taken every 30 minutes starting from 5:30AM till 11:30PM What I want to achieve is to have all backups for the same day to be contained in the same file on the disk. That is on Feb 18 2010 file c:\db_backup_02_18_10.BAK will be created at 5AM with full database backup. All backup logs that occur on Feb 18 will be appended to the same file. Next day c:\db_backup_02_19_10.BAK will be created at 5AM. Is this "correct" approach? The reason I like it is that everything needed to restore to any point in time for specific day is contained in one file and can be copied easily to a different computer. I tried to achieve this result via Maintenance Plan wizard by creating one task for full backup (scheduled once a day at 5AM) and another task for log backup (scheduled every 30 minutes starting from 5:30AM till 11:30PM) (both tasks are in the same maintenance plan). This, however, saves result from each job in a separate file called $DBNAME_backup_YYYY_MM_DD_HHMMSS_NNNNNNN.trn (for transaction log backup; will probably have extension .BAK for full backup) Can this even be done via Maintenance plan? I think I can achieve desired result via SSIS where I can generate file name programmatically and pass it as a parameter to "BACKUP DATABASE ..." or "BACKUP LOG ..." stat
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