How to settext to Asp.Net FileUpload?http://forums.asp.net/t/1477926.aspx/1?How+to+settext+to+Asp+Net+FileUpload+Tue, 06 Oct 2009 01:09:15 -040014779263441418http://forums.asp.net/p/1477926/3441418.aspx/1?How+to+settext+to+Asp+Net+FileUpload+How to settext to Asp.Net FileUpload? <p>How to settext to Asp.Net FileUpload?</p> <p>e.g. on asp.net web page, I have:</p> <p>&lt;asp:FileUpload ID=&quot;FileUpload_String_largeIcon&quot; runat=&quot;server&quot; /&gt;</p> <p></p> &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HtmlInputElement _ControlOflargeIcon = (HtmlInputElement)_ContainerOfControlOflargeIcon.ChildElements.Find(&quot;FileUpload_String_largeIcon&quot;);&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CommandParameters _A = new CommandParameters(WaitFor.None, PopupAction.ConfirmOK);&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_ControlOflargeIcon.Click(_A);&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_ControlOflargeIcon.SetText(&quot;D:\\Test\\1.jpg&quot;);&lt;/div&gt; &lt;div&gt;&lt;/div&gt; <p></p> <p>I want to set the file path:</p> <p>HtmlInputElement _ControlOflargeIcon = (HtmlInputElement)_ContainerOfControlOflargeIcon.ChildElements.Find(&quot;FileUpload_String_largeIcon&quot;);</p> <p>_ControlOflargeIcon.SetText(&quot;D:\\Test\\1.jpg&quot;);</p> &lt;div&gt;It is not working.&lt;/div&gt;&lt;div&gt;<br> &lt;/div&gt; <p></p> <p></p> 2009-10-05T17:23:22-04:003441662http://forums.asp.net/p/1477926/3441662.aspx/1?Re+How+to+settext+to+Asp+Net+FileUpload+Re: How to settext to Asp.Net FileUpload? <p>You can't do it directly, although there are &quot;alternate&quot; ways. Check this thread:</p> <p><a href="http://forums.asp.net/t/1121953.aspx">http://forums.asp.net/t/1121953.aspx</a>&nbsp;&nbsp;</p> 2009-10-05T19:34:58-04:003442158http://forums.asp.net/p/1477926/3442158.aspx/1?Re+How+to+settext+to+Asp+Net+FileUpload+Re: How to settext to Asp.Net FileUpload? <p></p> <blockquote><span class="icon-blockquote"></span> <h4>hugonne</h4> <p></p> <p>You can't do it directly, although there are &quot;alternate&quot; ways. Check this thread:</p> <p><a href="http://forums.asp.net/t/1121953.aspx">http://forums.asp.net/t/1121953.aspx</a>&nbsp;&nbsp;</p> <p></p> </blockquote> <p></p> <p>I got your answer, thank you very much.</p> <p><br> </p> <p><br> </p> <p></p> 2009-10-06T01:09:15-04:00