There are two simple steps to create a custom upload button:
- Create a HTML button or image button which will be used as custom upload button.
- Use the InsertButtonID property to specify the ID of the control that will be used as the upload button.
Example:
- <% @ Language="VBScript" %>
- <!--Step 1: Register Uploader to your page -->
- <!-- #include file="aspuploader/include_aspuploader.asp" -->
- <html>
- <body>
- <div>
- <%
- 'Step 2: Create Uploader object
- Dim uploader
- Set uploader=new AspUploader
- 'Step 3: Set a unique name to Uploader
- uploader.Name="myuploader"
- uploader.SaveDirectory="savefiles"
- 'Step 4: Specify ID of the control that will be used as upload button.
- uploader.InsertButtonID="uploadbutton"
- 'Step 5: Render Uploader
- uploader.GetString()
- %>
- <img id="uploadbutton" alt="Upload File" src="sampleimages/upload.png" />
- </div>
- </body>
- </html>