Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 06, 2009 01:09 AM by david4chao
Member
5 Points
6 Posts
Oct 05, 2009 05:23 PM|LINK
How to settext to Asp.Net FileUpload?
e.g. on asp.net web page, I have:
<asp:FileUpload ID="FileUpload_String_largeIcon" runat="server" />
I want to set the file path:
HtmlInputElement _ControlOflargeIcon = (HtmlInputElement)_ContainerOfControlOflargeIcon.ChildElements.Find("FileUpload_String_largeIcon");
_ControlOflargeIcon.SetText("D:\\Test\\1.jpg");
child elements
Contributor
2112 Points
403 Posts
Oct 05, 2009 07:34 PM|LINK
You can't do it directly, although there are "alternate" ways. Check this thread:
http://forums.asp.net/t/1121953.aspx
Oct 06, 2009 01:09 AM|LINK
hugonne You can't do it directly, although there are "alternate" ways. Check this thread: http://forums.asp.net/t/1121953.aspx
I got your answer, thank you very much.
david4chao
Member
5 Points
6 Posts
How to settext to Asp.Net FileUpload?
Oct 05, 2009 05:23 PM|LINK
How to settext to Asp.Net FileUpload?
e.g. on asp.net web page, I have:
<asp:FileUpload ID="FileUpload_String_largeIcon" runat="server" />
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> HtmlInputElement _ControlOflargeIcon = (HtmlInputElement)_ContainerOfControlOflargeIcon.ChildElements.Find("FileUpload_String_largeIcon");</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> CommandParameters _A = new CommandParameters(WaitFor.None, PopupAction.ConfirmOK);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> _ControlOflargeIcon.Click(_A);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> _ControlOflargeIcon.SetText("D:\\Test\\1.jpg");</div> <div></div>I want to set the file path:
HtmlInputElement _ControlOflargeIcon = (HtmlInputElement)_ContainerOfControlOflargeIcon.ChildElements.Find("FileUpload_String_largeIcon");
_ControlOflargeIcon.SetText("D:\\Test\\1.jpg");
<div>It is not working.</div><div></div>
child elements
hugonne
Contributor
2112 Points
403 Posts
Re: How to settext to Asp.Net FileUpload?
Oct 05, 2009 07:34 PM|LINK
You can't do it directly, although there are "alternate" ways. Check this thread:
http://forums.asp.net/t/1121953.aspx
Please mark as answer if the post helps.
Visit my coding blog. Any comments are well appreciated.
david4chao
Member
5 Points
6 Posts
Re: How to settext to Asp.Net FileUpload?
Oct 06, 2009 01:09 AM|LINK
I got your answer, thank you very much.