Click here to Skip to main content
15,886,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My task is to open the file browse window/dialogue box on click of a simple asp:button.
Later on when any file is selected the URL of the file is displayed in the asp:textbox by the asp:button.


This is same as asp:fileupload control but its custom generated one

Controls are as follows
<asp:button/> -> On Click -> Open Browse Window
<asp:textbox/> -> On Selection -> Path of File



Thanks for your support.
Posted

Try this..
VB
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
    txtfilename.Text = OpenFileDialog1.FileName
End if
 
Share this answer
 
Comments
onlybigb321 23-May-14 2:46am    
But please can you tell me how to Open the browse dialog box on button click event.

I am a newbie to coding world.
 
Share this answer
 
Comments
onlybigb321 23-May-14 3:21am    
Can you please get me the asp.net's vb code for web application for the same.

I am creating my own custom fileupload file control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900