Add the client' selected filename and it's path into a listbox.http://forums.asp.net/t/341451.aspx/1?Add+the+client+selected+filename+and+it+s+path+into+a+listbox+Thu, 18 Sep 2003 06:25:02 -0400341451341451http://forums.asp.net/p/341451/341451.aspx/1?Add+the+client+selected+filename+and+it+s+path+into+a+listbox+Add the client' selected filename and it's path into a listbox. Dear All, Can any of you provide a code fragment to solve the following problem? - I want to create a ASP.NET page, consist with 1 button and 1 ListBox. - When I click on the button, it will open a OpenFileDialog, which list the files in Client's computer. (Not Server) - Once the user choose a file, the name of the file and it's path will be added to the ListBox. - And if the user click the button and select a file again, it will add the name and path of the newly selected file into ListBox. I had try to use the following, but it does work at all. in MyPage.aspx <pre class="prettyprint">&lt;input type=&quot;file&quot; runat=&quot;server&quot; onClick=&quot;Button_Submit&quot;&gt;</pre> and in the C# code behind.... <pre class="prettyprint"> protected void Button_Submit(System.Object sender, System.EventArgs e) { System.Web.HttpPostedFile UpFile = TestFile.PostedFile; int FileLength; FileLength = UpFile.ContentLength; ... ... ... // haven't finish yet. I was just wanting to see if it can get the size of the file } </pre> Thanks Very Much 2003-09-18T06:03:44-04:00