WorkflowGen.com | Knowledge Base | Documentation | Downloads | Support | RSS

« How can I make my webform behave differently depending on the current action in the workflow? | Main | When a web form loads, how can I make the cursor start in a specific text box? »

How to make the FileUpLoad control display as a link to the file.

Posted on Sunday, February 24, 2008 at 10:24 by Registered CommenterWFG Team | CommentsPost a Comment

When using the Advantys file upload, we can display a link to the uploaded file but not allow the user to modify or delete the file. All you need to do is add the following line of code in your c# project: WorkflowFileUpload1.ReadOnly = true;

This could be added to a section of code that checks for a specific WorkflowGen action. 

To download the FileUpload component  please click here


C#

    protected void Page_Load(object sender, EventArgs e) {
        
switch (this.CurrentWorkflowActionName) {
            
case "INITIATES":
                
//  write code here
                
break;
            case 
"SECOND_ACTION":
                
//  set file upload 
                
WorkflowFileUpload1.ReadOnly = true;
                break;
        
}
    }

 

VB

    Protected Sub Page_Load(ByVal sender As ObjectByVal As EventArgs)
        
Select Case (Me.CurrentWorkflowActionName)
            
Case "INITIATES"
                
' write code here
            
Case "SECOND_ACTION"
                
' file upload 
                
WorkflowFileUpload1.ReadOnly = true
        End Select
    End Sub

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.