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


#1

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.

C#

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

VB

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Select Case(Me.CurrentWorkflowActionName)
 Case INITIATES 
 'write code here
 Case SECOND_ACTION
 'fileupload
 WorkflowFileUpload1.ReadOnly = true
End Select
End Sub