如何在不浏览FileUpload的情况下分配路径 [英] How it is possible to assign path without Browsing in FileUpload
本文介绍了如何在不浏览FileUpload的情况下分配路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在页面加载时为FileUpload分配路径值.像:[C:\ PP \ Test.txt]
当我浏览时,它将其填充为[C:\ PP \ Test.txt],
如何在不浏览的情况下分配路径.
控件为:
I want to assign Path value to FileUpload on Page Load. Like : [C:\PP\Test.txt]
As When I Browse then it fill it [C:\PP\Test.txt],
How it is possible to assign path without Browsing.
Control is :
<asp:FileUpload ID="FUdb" runat="server" />
推荐答案
您不能.
您甚至不能通过推断来判断客户端计算机的结构.安全禁止这样做!
You can''t.
You cannot tell - even by inference - the structure of the client''s machine. Security forbids it!
不可能:
声明式语法
其他
No not possible:
Declarative Syntax
other
<asp:fileupload xmlns:asp="#unknown">
AccessKey="string"
BackColor="color name|#dddddd"
BorderColor="color name|#dddddd"
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
Inset|Outset"
BorderWidth="size"
CssClass="string"
Enabled="True|False"
EnableTheming="True|False"
EnableViewState="True|False"
Font-Bold="True|False"
Font-Italic="True|False"
Font-Names="string"
Font-Overline="True|False"
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
Large|X-Large|XX-Large"
Font-Strikeout="True|False"
Font-Underline="True|False"
ForeColor="color name|#dddddd"
Height="size"
ID="string"
OnDataBinding="DataBinding event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
SkinID="string"
Style="string"
TabIndex="integer"
ToolTip="string"
Visible="True|False"
Width="size"
/>
这篇关于如何在不浏览FileUpload的情况下分配路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文