Losing the value of a FileUpload textbox when a dropdown list selection changes
<p>I am having an dropdownlistbox and fileupload control.After selecting a file from upload control,if i change the dropdownlist value(postback occurs) then the file path i choosen earlier is shown empty.
here is my code:</p>

<pre><code>&lt;asp:Label ID="lblupload" runat="server" Text="Upload a file: "&gt;&lt;/asp:Label&gt;                
   &lt;asp:FileUpload ID="upload" runat="server" Width="320" Height="18" BorderColor="Gray" BorderWidth="1" /&gt;
   &lt;asp:Label ID="Perimission" runat="server" Text="Perimission"&gt;&lt;/asp:Label&gt;
   &lt;asp:DropDownList ID="ddlState" runat="server" OnSelectedIndexChanged="ddlState_SelectedIndexChanged" AutoPostBack="true" &gt;
        &lt;asp:ListItem Text="Everybody"  Value="Everybody"&gt;&lt;/asp:ListItem&gt;
        &lt;asp:ListItem Text="Students"  Value="Students"&gt;&lt;/asp:ListItem&gt;
        &lt;asp:ListItem Text="Selected Users"  Value="Selected Users"&gt;&lt;/asp:ListItem&gt;
    &lt;/asp:DropDownList&gt;
</code></pre>
