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

**URL:** <https://discuss.workflowgen.com/t/how-to-make-the-fileupload-control-display-as-a-link-to-the-file/155>\
**Category:** Visual Studio Web Forms\
**Created:** [February 25, 2008, 4:24am UTC](https://discuss.workflowgen.com/t/how-to-make-the-fileupload-control-display-as-a-link-to-the-file/155 "2008-02-25T04:24:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [February 25, 2008, 4:24am UTC](https://discuss.workflowgen.com/t/how-to-make-the-fileupload-control-display-as-a-link-to-the-file/155/1 "2008-02-25T04:24:24Z")

</div>

When using the WorkflowGen file upload, you can display a link to the uploaded file but not allow the user to modify or delete the file. To do this, add the following line of code in your C# project:

```auto
WorkflowFileUpload1.ReadOnly = true;

```

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

**C#**

```auto
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**

```auto
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

```
