Question : How do I access the Request.Files from JavaScript?

This is a real newbe question.  I have an ASP.Net page where I am calling the jQuey dialog from a JavaScript function. Each time the user selects a file I would like to add the file to a simple table on the page.

If I understand the jQuery function correctly it is adding the selected file to Request.Files.  I can access this from VB.Net or C#.  

Is there any way to access the Request object from JavaScript?

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:

 <script type="text/javascript">

        // jQuery Dialog
        $(function () {
            $("#dialog").dialog({
                bgiframe: true,
                height: 140,
                modal: true,
                autoOpen: false,
                resizable: false
            })
        });

        function GetCsvFile() {

            // jQuery call to prompt user for a file
            jQuery('#dialog').dialog('open');

            // Want to list all files selected to a simple table on the page...

            
        }

                <div id="dialog" title="Add CSV File">
                    <form action="/File.mvc/Upload" enctype="multipart/form-data" method="post">
                    <p>
                        <input type="file" id="fileUpload" name="fileUpload" size="23" /></p>
                    <p>
                        <input type="button" id="addFile" name="addFile" value="Add File" onclick="AddSmsCsvToList()" />   <input type="submit" value="Upload" /> </p>
                   </form>
                </div>

Answer : How do I access the Request.Files from JavaScript?

give each query a dummy column that uniquely identifies it
and then use row_number to pick just the first value


SELECT column1, column2, column3, column4
FROM (SELECT x.*, ROW_NUMBER() OVER (PARTITION BY column1, column2, column3 ORDER BY dummy) rn
FROM (SELECT 1 dummy, 'a' column1, 'b' column2, 'c' column3, 'Note 1' column4 FROM DUAL
UNION ALL
SELECT 2 dummy, 'a' column1, 'b' column2, 'c' column3, 'Note 2' column4 FROM DUAL) x)
WHERE rn = 1

Random Solutions  
 
programming4us programming4us