Browse for a new file

How can i open a browse window to choose folder and name for a new fil

Page 1 of 1

4 Replies - 1435 Views - Last Post: 12 March 2009 - 07:35 AM Rate Topic: -----

#1 yurymb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-March 09

Browse for a new file

Posted 10 March 2009 - 01:02 PM

I have an application that generates a excel file using a datastore data. It was all working fine till the user asked me that he wants choose the location and name for the new file. I tried to use the html control file field, but it works only wth a pre-existing file. Then i tried the following code :

	  Dim fdlg As System.Windows.Forms.OpenFileDialog = New OpenFileDialog
		fdlg.Title = "Escolha a localização para a gravação do arquivo excel"
		fdlg.InitialDirectory = "c:\"
		fdlg.Filter = "Excel Files (*.xls)|*.xls|Excel Files (*.xlsx)|*.xlsx"
		fdlg.FilterIndex = 2
		'fdlg.DefaultExt() = True
		fdlg.RestoreDirectory = True
		If fdlg.ShowDialog() = DialogResult.OK Then
			sFile = fdlg.FileName
		End If



It seams to work, but the browse window, does not appear. After sometime i realized that it opens, but behind the bowser, and it does not work since the buttons and windows does not appear.
Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: Browse for a new file

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: Browse for a new file

Posted 10 March 2009 - 02:06 PM

Is this a web application?
Was This Post Helpful? 0
  • +
  • -

#3 yurymb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-March 09

Re: Browse for a new file

Posted 11 March 2009 - 04:34 AM

Yes it is. I set the IIS service to allow interaction with desktop...
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: Browse for a new file

Posted 11 March 2009 - 07:36 AM

OK, off to ASP.NET then.
Was This Post Helpful? 0
  • +
  • -

#5 yurymb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-March 09

Re: Browse for a new file

Posted 12 March 2009 - 07:35 AM

Thanks for the great help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1