I have a simple web application which aims to take backup from an oracle9i database. Where i need to click on a button to invoke the openfile dialog box and select the location and input the dump filename. After this the application will start creating the backup and create the dump file in the selected location.

Now my question is how can i invoke a common dialog box using asp.net (my code-behind is in c#)

Is it possible?

Can anyone help me
This is very urgent

Looking for some good stuffs

Thanks in advance...


9 Years
Discussion Span
Last Post by SheSaidImaPregy

To add a confirm button to asp.net

Confirm box

'In ASPX Source add
<asp:Button ID="StartBackup" Runat="server" OnClientClick="return confirm('Are you sure you want to start the Backup?');" CommandName="Backup" Text="Enter"/>

'In the Code Page add
Protected Sub StartBackup_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles StartBackup.Click
      'This code will only fire off if the OK button is selected
End Sub

This code is in VB.NET but you should be able to convert


looks like you'd mistaken me.

my question is to invoke a file open dialog box by pressing a button from a web form not just displaying a confirm button.

i do know how to implement confirm button but my problem is not this now.

can anyone tell me how to accomplish this?
is it possible???

plz plz.............




Add a FileUpload Control to your web form

<asp:FileUpload ID="FileUpload" runat="server" Width="408px" />

and you can access some of the files details like this

Filename = FileUpload.PostedFile.FileName.ToString
FileType = FileUpload.PostedFile.ContentType.ToString
FileSiteInBytes = FileUpload.PostedFile.ContentLength
FileSizeInKb = (FileUpload.PostedFile.ContentLength / 1024)

And you can finally save the file like this

FileUpload.PostedFile.SaveAs(Server.MapPath("~/FileSaveFolder/") & FileName

Please note that you will need write access to the folder

Also the code is in VB.NET again but you should be able to convert


but keep in mind, you can only access information about the file after it's been uploaded. So don't use that info for verification purposes to prevent huge uploads, it will only verify AFTER it uploads lol

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.