Click here to Skip to main content
15,845,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello and thank you for taking the time to read this question.
I am new to ASP.net Core MVC so I am still learning the ropes. I have successfully used the standard File dialog box to bring up a directory where I can pick a file. I would like to add a feature to this dialog - specifically a checkbox.
Thanks Cara

What I have tried:

I have tried searching internet and books, If it's out there then I don't see it or have a full grip of mvc to to a grip on what to do.

Is there a way to bring up a dialog box similar to the file dialog box and add features to it, such as a checkbox or radio buttons?  Would this need to be in a parent child dialog scenario where the parent opens the file picker and then opens the child once the ok button is clicked.  The child would have checkboxs and or radio buttons.  Want I want to do is add features for the user to be able to decide if they want sorting or not as an example.  Can someone assist with perhaps with a coding example.  I am a visual learner.
Posted
Updated 1-Dec-22 6:06am

1 solution

No.

The only* way to select a file in a web application is using an <input type="file">. You cannot control or modify the dialog box in any way. Aside from the fact that your modifications probably wouldn't work across operating systems, it would post a major security vulnerability.

<input type="file"> - HTML&colon; HyperText Markup Language | MDN[^]

* Technically, there's also the experimental window.showOpenFilePicker method[^]; but that doesn't let you customize the dialog box either, for the same reasons.
 
Share this answer
 
v2

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