Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.NET
<asp:FileUpload ID="FUdb" runat="server" />
Posted
Updated 21-Oct-11 4:03am
v2
Comments
RaisKazi 21-Oct-11 10:03am    
Removed "pre" tag from regular text.

You can't.

You cannot tell - even by inference - the structure of the client's machine. Security forbids it!
 
Share this answer
 
No not possible:

Declarative Syntax

other
ASP.NET
<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"
/>
 
Share this answer
 
v2
Comments
LebneizTech 21-Oct-11 10:33am    
Sir, I am using Microsoft Visual Web Developer 2005,it does not support.
Please resend it
Herman<T>.Instance 21-Oct-11 10:37am    
do you understand my answer. It can NOT be done

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900