Save file dialog is not working while hosting

Posted by Sateeshkumar.Singupuram under ASP.NET on 6/19/2013 | Points: 10 | Views : 952 | Status : [Member] | Replies : 6
Hi,
i am new to web environment and developing a web application. and faced an issue with save file dialog. it is working properly in my pc but getting issue when i host in another pc and running. i would be thankful if somebody can trace out the issue and help with an immediate solution. thanks in advance.

sateesh kumar singupuram


Responses

Posted by: Peermohamedmydeen on: 6/19/2013 [Member] Bronze | Points: 25

Up
0
Down
HI,

Can u upload the piece of code or trace log, so that we could be able to throw some idea, suggestion on this issue.


Best
PMM

Sateeshkumar.Singupuram, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sateeshkumar.Singupuram on: 6/19/2013 [Member] Starter | Points: 25

Up
0
Down
hi PMM,
thanks for the responce and here is my as follows

string path = string.Empty;
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "pdf|*.pdf";
saveFileDialog1.Title = "Save COC File";
saveFileDialog1.ShowDialog();
if (saveFileDialog1.FileName != "")
{
path = saveFileDialog1.FileName;
}
i am trying to create a new folder which is based on user's choice so need to be able to select a path to create new folder through Save file dialog.

sateesh kumar singupuram

Sateeshkumar.Singupuram, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Peermohamedmydeen on: 6/19/2013 [Member] Bronze | Points: 25

Up
0
Down
Hi,

If you want to browse the server's directory from the browser it is not possible at all.

And, System.Windows.Forms.SaveFileDialog is only intended for winforms and it does not work in web applications. If you want to save a file locally in your client machine, you can use Server.MapPath to perform such action.

Please let us know what you are exactly trying to perform.

Best,
PMM

Sateeshkumar.Singupuram, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sateeshkumar.Singupuram on: 6/19/2013 [Member] Starter | Points: 25

Up
0
Down
hi pmm,
i want to save some files on the client machine by creating a new folder of user choice. so user should be able to create a newfolder on his machine to save these files by using my application. please suggest me a better way to do this. thank you.

sateesh kumar singupuram

Sateeshkumar.Singupuram, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Peermohamedmydeen on: 6/19/2013 [Member] Bronze | Points: 25

Up
0
Down
hi,

You can try something like this as below to force the file download dialog to appear and allow the user to save the file of theirs choice.

http://aspalliance.com/259

Best,
Mydeen

Sateeshkumar.Singupuram, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sateeshkumar.Singupuram on: 6/19/2013 [Member] Starter | Points: 25

Up
0
Down
thanks PMM,
it may solve half of my requirement but i have some 10 to 15 files which will be copied into the clients machine. and each time he need not give the file name correct. my requirement is : user shouls be able to select a path in his local machine and will create a folder , soon after clocking ok all the files i have selected from my pc should move to his machine.

sateesh kumar singupuram

Sateeshkumar.Singupuram, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response