hi frds.
i want to get path of new created folder by save file dialog box.
hope you will help me

Dani AI

Generated

Good follow-up, — and thanks to for pointing to the save dialog property. Important distinction: the SaveFileDialog approach applies to desktop clients (it returns the chosen path/filename). Web browsers do not expose a full client-side disk path for security, so the workflow differs for PHP/web apps.

For a Windows desktop app (C# or VB.NET): read the path returned by the dialog, build XML with a proper API (XmlDocument/XmlWriter or LINQ to XML) and save to that path. Before saving, verify the directory exists (create it if needed), use path helpers rather than string concatenation, check write permissions, and wrap the save in exception handling to catch IO and permission errors. See XmlDocument.Save and Path.Combine for the recommended APIs.

For a PHP/web workflow: the server cannot show a native save-file dialog on the client or obtain a client full path. Generate the XML server-side (DOMDocument or SimpleXML), persist it safely with functions like file_put_contents or DOMDocument::save, and either store it in a controlled server folder or stream it back for download with proper headers. If accepting uploads, use the HTML file input correctly (clients often send a fake path) and follow upload best practices (validate, sanitize, move_uploaded_file). See the HTML file input notes at MDN.

Caution: never trust client-supplied names or paths — always sanitize file names and write only to controlled directories.

Recommended Answers

All 2 Replies

SaveFileDialog1.FileName

thanx frd
it work but i want to write at that path and save it in xml .
what i do ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.