.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

Thoughts from a new person working with WF 4.0

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :Windows Application

My first impression of WF 4.0 is "Confusing".   But what I can't yet figure out is am I confused because WF is a dumbed down way for non programmers to do things, or as a wrapper does it force me to learn something differently?  Having a C# background I find the requirements for coding up activities to be VB.NET which bugs me, but hey I can deal with it. 

But here's the part I don't get...  To me, I should be able to rough out a WorkFlow based on customer input using pretty Rectangles, Squares, Computer Icons, Disk Icons, SQL icons etc.  But there are none of those types of constructs, rather it appears to be just one layer above actual code layer (with respect to the diagramming), with things like DoWhile, IFThen, Select icons, as well as a very very sparse FlowChart that has just two things init, the Flowchart template and a Decision and Select icon.  Now when I think about a FlowChart I think about Labels that are just place holders along with the decision statements.  So what is confusing to me is this "How do I start at a high level and then flesh-out the details later.   WF 4.0 appears to lend itself more to fleshing out details, with 10 drag items under Control Flow (if then, do while, for each etc).  Then it has just three items for flowchart, 7 items for Messaging (code like activity

View Complete Post

More Related Resource Links

Workflows only working for one person



I have a workflow that i have created in SharePoint designer that only runs for myself.  When I create a new item, an email gets sent out, and I can look into the workflow history for that item and see that my workflow completed. If anyone else creates an item, nothing happens and there is nothing in the workflow history.

I have a test server that i tried this on and everything works fine. When I do the exact same process on the production server, this happens.

What could possibly be so different between the servers?

Test server - windows 2003, sharepoint 2007

production - windows 2008, sharepoint 2007



Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


upload file not working



iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

jquery confirm windows isn't working


Hi, i am using jquery to implement a modal confirm windows but it not working

i have a template field button with ajax confirm using jquery but i have a problem. Apper the confirm windows but when i click on "yes" doesn't execute the delete command. without ajax (using template field button and simple confirm windows javascript) works so well.

Can you give me a hand with this?

thx in advance!

<link href="_assets/css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="_assets/css/confirm.css" rel="stylesheet" type="text/css" />
<script src="_assets/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="_assets/js/jquery.simplemodal-1.1.1.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
       $(".deleteCustomer").click(function(ev) {
                var msg = $(this).attr("title");
                confirm(msg + "?");

Keyboard shortcuts stops working in WebMatrix


I'm often experiencing that keyboard shortcuts stops working in WebMatrix. This is very annoying as CTRL-S, CTRL-C, CTRL-V, etc. stops working, all of which are heavily used when programming. It's obviously hard to explain how to reproduce this, but I was wondering if someone knows a quick-fix?

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



Logging to database is not working



Am using Enterprise library 4.0 for logging exceptions to SQL server database. The code is working fine if I run my asp.net application from the Visual studio IDE.However if I publish the site and host it on IIS, then my application is not logging the errors to database.Here is the page load event of my application.Kindly help me in finding out the error.

Thanks in advance


 protected void Page_Load(object sender, EventArgs e)
                //If exception occurs due to unauthorized access
                if ((Request.QueryString["Unauthorized"] != null) && (Request.QueryString["Unauthorized"].Equals("Y")))
                        lblErrorMessage.Text = "You are not authorized to view this page";
                        //Get the user and machine names                       
                        string strUserName = User.Identity.Name;
                        string strMachineName = System.Environment.MachineName;
                        //Raise Error
                        throw new System.UnauthorizedAccessException("Unauthorized access--User Name:" + strUserName + "--Machine Name:" + 

URL Rewriter.net - not working



I have a website that uses Querystrings to determine what content to show on a page. I would like to be able rewrite these URL's to become Search Engine Friendly URLs. So for example I would like to change http://www.website.co.uk/Company/Company/Conference.aspx?WebPage=ImportantDates to http://www.website.co.uk/Company/Company/Conference.aspx/ImportantDates.

I have been reading the following article by Scott Gu - http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx - who suggested using a HTTPModule such as URL Rewriter.net (http://urlrewriter.net/).

So I have done this and added the URLRewriter.dll file in my bin directory and altered the web.config (following Scott Gu's approach #2). However my URL's are not changing and I don't know what I am doing wrong. I have added the following in the web.config to try and change the URL's.


    <rewrite url="~/UKAIS/ConferenceWebPage.aspx?WebPage=(.+)$" to="~/UKAIS/ConferenceWebPage.aspx/$1" />

However my webpage URL remains with the ?WebPage querystring.

I am really stuck and any help would be very much appreciated.



Localization not working in class library (composite control)



I have a class library called WEM.portal which used Resource files to localise text in my composite controls.

I store my resource files (eg MyResourceFile1.resx) in App_GlobalResources folder and then refer to them using

MyLabel1.text = My.Resources.MyResourceFile1.MyResourceKey1

This is all working ok until I create seperate files for each language such as MyResourceFile1.FR-fr.resx.

I have implemented this throughout my other web applications but the Class Library doesnt seem to want to work the same way

When I load the page it correctly showes the resourced keys which I have done through the web application BUT the resource keys in the composite controls does not seem to pick up the culture code.

Am I missing something stupid. Ive tried

  • changing the Build Action on the resource file to Content and Custom tool to GlobalResourceProxyGenerator
  • Creating a resourceManager but to no avail


System.Drawing.Image.Fromfile is not working


I am trying to get the height and width of the image dynamically.  The reason is I am loading multiple images using code, where the image name is from the database. 

Here is my code:

in the ascx page, I have an asp image

<asp:image id="imgInfo" runat="server" /> 


In the code behind

string ImagePath = "~/products/img/" + dataviewImgInfo[0]["imgName"].ToString();

System.Drawing Image imgProd = System.Drawing.Image.FromFile(ImagePath);

if(imgProd.Height > 200)

imgInfo.Height = 100;




imgInfo.Height = 200



WHen I run this page I am getting the folloiwng error

image resizer not working


I thought the following image resizer with the following code was working with smaller images but one thing I know for sure is that it's not working with larger ones. I want to have a max height of 300 px. The dimensions work out fine but don't save with the file. If someone can help me understand a better way, I'd appreciate it.

    Protected Sub FormatImage(ByVal ful As FileUpload, ByVal strFile As String) 
        Const intMaxWidth As Integer = 300 'max width
        Const intMaxHgt As Integer = 300 'max height
        Dim intNewWidth, intNewHgt As Integer 'new width/height
        Dim sglSize As Single 'temp variable used when calculating new size
        Dim imgOriginal As Image 'holds the original image
        Dim dblWidthProp, dblHgtProp As Double
        imgOriginal = Image.FromStream(ful.FileContent)
        intNewWidth = imgOriginal.Width
        intNewHgt = imgOriginal.Height
        Dim imgOutput As New Bitmap(intNewWidth, intNewHgt)
        If strFile IsNot Nothing And CheckFileFormat(strFile) = True Then
                Do While intNewWidth > 300 Or intNewHgt > 300
                    dblWidthProp = imgOriginal.Width / intMaxWidth
                    dblHgtProp = imgOriginal.Height / intMaxHgt
                    If dblWidthProp > dblHgtProp Then

SMTP not working if I use web deployment package to deploy my app.


Hi all

I use msdeploy to install my web app. deployment package. everything about web app works, but find out email was not working.

I checked telnet smtp is running.

I debug the project, and it was sending out email too.

So my solution was upload the whole project (not complied) to wwwroot, and email works too. Thats why I assume the deployment cause the problem.

at last, I also tried to copy the web deployment web.config to replace the project's web.config, and the email also work, so it wasn't the web.config problem.

Could anyone tell me whats going on?

My environment:

window 2003

iis 6

.net framework 4.0

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