<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3279010.aspx</link><pubDate>Tue, 07 Jul 2009 12:58:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3279010</guid><dc:creator>Prateek1</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3279010.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3279010</wfw:commentRss><description>&lt;p&gt;yes i upload file from client side and save that file into server side &lt;/p&gt;&lt;p&gt;if that not solve your&amp;nbsp; requirement then send reply again what is ur need ?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;i m try my best to solve your problem&lt;/p&gt;&lt;p&gt;Regard &lt;/p&gt;&lt;p&gt;Prateek&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3278675.aspx</link><pubDate>Tue, 07 Jul 2009 10:07:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3278675</guid><dc:creator>shahed.kazi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3278675.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3278675</wfw:commentRss><description>&lt;p&gt;Not sure what the problem is. You are uploading a file from the client and saving it to your server. You can choose to rename the filename and save it to any folder as long as the user running the web app has write access to the directory.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3278658.aspx</link><pubDate>Tue, 07 Jul 2009 10:00:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3278658</guid><dc:creator>Prateek1</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3278658.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3278658</wfw:commentRss><description>&lt;p&gt;jst use this script:&lt;/p&gt;&lt;p&gt;&amp;lt;script language=&amp;quot;VB&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;Sub Upload(Source As Object, e As EventArgs)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; If Not (myFile.PostedFile Is Nothing) Then&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim intFileNameLength as Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strFileNamePath as String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strFileNameOnly as String&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;Logic to find the FileName (excluding the path)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFileNamePath = MyFile.PostedFile.FileName&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intFileNameLength = Instr(1, StrReverse(strFileNamePath), &amp;quot;\&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFileNameOnly = Mid(strFileNamePath, (Len(strFileNamePath)-intFileNameLength)+2)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;myFile.PostedFile.SaveAs(&amp;quot;c:\inetpub\wwwroot\yourwebapp\upload\&amp;quot; &amp;amp; strFileNameOnly)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFile.PostedFile.SaveAs(&amp;quot;d:\&amp;quot; &amp;amp; strFileNameOnly)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblMsg.Text = &amp;quot;File Upload Success.&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;End Sub&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;and call this script on button click and ur problem is solved &lt;/p&gt;&lt;p&gt;if ur problem is solved marked as answer plz&lt;/p&gt;&lt;p&gt;Regard&lt;/p&gt;&lt;p&gt;Prateek&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3276778.aspx</link><pubDate>Mon, 06 Jul 2009 13:01:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276778</guid><dc:creator>kaushalparik27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276778.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3276778</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;shahid.majeed:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;i have some doudth in my mind. i am renaming the file. for example file name is abc.doc and i rename it with the code 1011abc.doc , butt at client computer file name remain abc.doc. when fileupload control try to upload the file with 1011abc.doc it did not find on the client computer.&amp;nbsp;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;try out yourself... it should work.. SaveAs() method will save the object that resides as FileUpload.PostedFile with given name..&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3276649.aspx</link><pubDate>Mon, 06 Jul 2009 11:28:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276649</guid><dc:creator>shahid.majeed</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276649.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3276649</wfw:commentRss><description>&lt;p&gt;i have some doudth in my mind. i am renaming the file. for example file name is abc.doc and i rename it with the code 1011abc.doc , butt at client computer file name remain abc.doc. when fileupload control try to upload the file with 1011abc.doc it did not find on the client computer.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3275444.aspx</link><pubDate>Sun, 05 Jul 2009 15:21:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3275444</guid><dc:creator>kaushalparik27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3275444.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3275444</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;shahid.majeed:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;FileField.PostedFile.SaveAs(UpPath&amp;nbsp;+&amp;nbsp;c);&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;just a small mistake..&lt;/p&gt;&lt;p&gt;you need to combine the path as..&lt;/p&gt;&lt;p&gt;&lt;b&gt;FileField.PostedFile.SaveAs(System.IO.Path.Combine(UpPath, c));&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;hope it helps./.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3275222.aspx</link><pubDate>Sun, 05 Jul 2009 08:56:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3275222</guid><dc:creator>shahid.majeed</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3275222.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3275222</wfw:commentRss><description>&lt;p&gt;when i am going to rename the file name, &amp;nbsp;but its not uploading the file. even did not give me any error. please let me know what is the problem in my code.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Here is my Code&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre name="code" class="c-sharp"&gt;protected void Button2_Click(object sender, EventArgs e)
    {
       //find upload directory
        string UpPath;
        UpPath = Server.MapPath(&amp;quot;CV&amp;quot;);
        
        // Renaming the file name
        string strFileName;
        strFileName = FileField.PostedFile.FileName;
        string c = System.IO.Path.GetFileName(strFileName);
        c = this.Session[&amp;quot;JobNo&amp;quot;].ToString()+ c; 
        
        //Uploading the CV
        try
        {
            Image2.Visible = true;
            FileField.PostedFile.SaveAs(UpPath + c);
            Image2.Visible = false;
            Label2.Visible = true;
        }
        catch (Exception exp)
        {
            Label2.Text = exp.Message.ToString();
            Label2.Visible = true;
        }
    }&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Page Code&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;pre name="code" class="c-sharp"&gt;&lt;span class="Apple-style-span" style="font-weight:normal;"&gt;&amp;lt;table cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; class=&amp;quot;style8&amp;quot;&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *Name:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox2&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                           &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *Email Address:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox4&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *Contact Number:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                               &amp;lt;asp:TextBox ID=&amp;quot;TextBox5&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt; &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *City:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox6&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                Your CV:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:UpdatePanel ID=&amp;quot;UpdatePanel1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
                                                    &amp;lt;ContentTemplate&amp;gt;
                                                        &amp;lt;asp:FileUpload ID=&amp;quot;FileField&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;247px&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
                                                        &amp;lt;asp:Button ID=&amp;quot;Button2&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Upload&amp;quot; Height=&amp;quot;20px&amp;quot; 
                                                            onclick=&amp;quot;Button2_Click&amp;quot; /&amp;gt;&amp;lt;asp:Image ID=&amp;quot;Image2&amp;quot; runat=&amp;quot;server&amp;quot; Visible=&amp;quot;False&amp;quot; /&amp;gt;
                                                        &amp;lt;asp:Label ID=&amp;quot;Label2&amp;quot; runat=&amp;quot;server&amp;quot; Font-Names=&amp;quot;Arial&amp;quot; Font-Size=&amp;quot;10pt&amp;quot; 
                                                            ForeColor=&amp;quot;#535353&amp;quot; Text=&amp;quot;File Uploaded Successfully&amp;quot; Visible=&amp;quot;False&amp;quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;
                                                    &amp;lt;/ContentTemplate&amp;gt;
                                                    &amp;lt;Triggers&amp;gt;
                                                        
                                                        &amp;lt;asp:PostBackTrigger ControlID = &amp;quot;Button2&amp;quot; /&amp;gt;
                                                    &amp;lt;/Triggers&amp;gt;
                                                &amp;lt;/asp:UpdatePanel&amp;gt;
                                                
                                            &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; 
                                                width=&amp;quot;150px&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;
                                                Describe Yourself:                              &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox8&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot; Height=&amp;quot;200px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; 
                                                width=&amp;quot;150px&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Apply&amp;quot; 
                                                    onclick=&amp;quot;Button1_Click&amp;quot; /&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: left; height: 30px; padding-left: 10px;&amp;quot; 
                                                colspan=&amp;quot;3&amp;quot;&amp;gt;
                                                &amp;lt;asp:Label ID=&amp;quot;Label1&amp;quot; runat=&amp;quot;server&amp;quot; ForeColor=&amp;quot;#009999&amp;quot; 
                                                    Text=&amp;quot;* Your Resume Send Successfully.&amp;quot; Visible=&amp;quot;False&amp;quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                    &amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight:normal;"&gt;Thanks&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3275081.aspx</link><pubDate>Sun, 05 Jul 2009 03:51:57 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3275081</guid><dc:creator>kaushalparik27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3275081.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3275081</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;shahid.majeed:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;because my be some one already save the file with the same file name.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;There are possible 2 alternatives.. whenever you upload a file:&lt;/p&gt;&lt;p&gt;[1] just check whether file exists or not in the folder where you want to save the file. IF it exists then simply delete it first before saving the file:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;        if (System.IO.File.Exists(Server.MapPath(&amp;quot;~/images/test.jpg&amp;quot;)))
            System.IO.File.Delete(Server.MapPath(&amp;quot;~/images/test.jpg&amp;quot;));
        FileUpload1.PostedFile.SaveAs(Server.MapPath(&amp;quot;~/images/test.jpg&amp;quot;));&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;OR&lt;/p&gt;&lt;p&gt;[2] save the file with some other name (renaming the file with some other name as you want to do)&lt;/p&gt;&lt;p&gt;you can save the file with any/proper file naming convension with PostedFile.SaveAs() method as:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;        FileUpload1.PostedFile.SaveAs(Server.MapPath(&amp;quot;~/images/test.jpg&amp;quot;));&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;hope it helps./.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3274728.aspx</link><pubDate>Sat, 04 Jul 2009 14:27:26 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274728</guid><dc:creator>mudassarkhan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274728.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274728</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Refer here&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa479405.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa479405.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3274716.aspx</link><pubDate>Sat, 04 Jul 2009 14:01:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274716</guid><dc:creator>shahid.majeed</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274716.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274716</wfw:commentRss><description>&lt;p&gt;i do with the triger, its upload the file at destination. now i want to rename the user file before uploading. because my be some one already save the file with the same file name. so please let me know how i can do this.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3274708.aspx</link><pubDate>Sat, 04 Jul 2009 13:45:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274708</guid><dc:creator>Ram Reddy Mekha</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274708.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274708</wfw:commentRss><description>&lt;p&gt;Do this:&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:UpdatePanel runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ContentTemplate&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:FileUpload runat=&amp;quot;server&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; Text=&amp;quot;Upload&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ContentTemplate&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Triggers&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:PostBackTrigger ControlID=&amp;quot;btnUpload&amp;quot; /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Triggers&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:UpdatePanel&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;protected void btnUpload_Click(object sender, EventArgs e)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string filename = System.IO.Path.GetFileName(fuUpload.FileName);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fuUpload.SaveAs(&amp;quot;C:\temp&amp;quot; + filename);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;Here is good discussion on file upload in AJAX Update Panel.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forums.asp.net/p/1105208/1689084.aspx"&gt;http://forums.asp.net/p/1105208/1689084.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3274688.aspx</link><pubDate>Sat, 04 Jul 2009 13:17:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274688</guid><dc:creator>mudassarkhan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274688.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274688</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Refer here for how to use Fileuplaod in update panel&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.aspsnippets.com/post/2009/05/05/Using-FileUpload-Control-inside-ASPNet-AJAX-UpdatePanel-Control.aspx"&gt;http://www.aspsnippets.com/post/2009/05/05/Using-FileUpload-Control-inside-ASPNet-AJAX-UpdatePanel-Control.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3274678.aspx</link><pubDate>Sat, 04 Jul 2009 13:10:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274678</guid><dc:creator>integrasol</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274678.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274678</wfw:commentRss><description>&lt;p&gt;Skip using the PostedFile property and just use SaveAs. Once the file has been uploaded (using SaveAs) you can use the PostedFile property.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: File Upload Control</title><link>http://forums.asp.net/thread/3274674.aspx</link><pubDate>Sat, 04 Jul 2009 13:09:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274674</guid><dc:creator>kaushalparik27</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274674.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274674</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;shahid.majeed:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;li class=""&gt;&lt;span&gt;&amp;nbsp;&amp;lt;asp:UpdatePanel&amp;nbsp;ID=&lt;span class="string"&gt;&amp;quot;UpdatePanel1&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;runat=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;ContentTemplate&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;asp:FileUpload&amp;nbsp;ID=&lt;span class="string"&gt;&amp;quot;FileField&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;runat=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Width=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;247px&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;/&amp;gt;&amp;lt;br&amp;nbsp;/&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;asp:Button&amp;nbsp;ID=&lt;span class="string"&gt;&amp;quot;Button2&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;runat=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Text=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;Upload&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Height=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;20px&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;onclick=&lt;span class="string"&gt;&amp;quot;Button2_Click&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;/&amp;gt;&amp;lt;asp:Image&amp;nbsp;ID=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;Image2&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;runat=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Visible=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;/&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;asp:Label&amp;nbsp;ID=&lt;span class="string"&gt;&amp;quot;Label2&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;runat=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Font-Names=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;Arial&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Font-Size=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;10pt&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ForeColor=&lt;span class="string"&gt;&amp;quot;#535353&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Text=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;File&amp;nbsp;Uploaded&amp;nbsp;Successfully&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;Visible=&lt;/span&gt;&lt;span class="string"&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="alt"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/ContentTemplate&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/asp:UpdatePanel&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;File upload control would not work with update panel (known issue)... to make it work you need to have a button with registered as asynchrinous postback..&lt;/p&gt;&lt;p&gt;check out some reference thread &amp;gt; &lt;a href="http://forums.asp.net/p/1134369/1807517.aspx#1807517"&gt;UpdatePanel and FileUpload - ASP.NET Forums&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://forums.asp.net/t/1142794.aspx"&gt;Fileupload inside updatepanel problems - ASP.NET Forums&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://forums.asp.net/p/1105208/1689084.aspx"&gt;File Upload Control is not working in Update Panel - ASP.NET Forums&lt;/a&gt;&lt;/p&gt;&lt;p&gt;hope it helps./.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>File Upload Control</title><link>http://forums.asp.net/thread/3274645.aspx</link><pubDate>Sat, 04 Jul 2009 12:38:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274645</guid><dc:creator>shahid.majeed</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274645.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274645</wfw:commentRss><description>&lt;p&gt;Hi friends i have a error in my file upload control. i select the file that i want to upload, but when i click the upload button. its give the this error. i dont know why this error come.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Error:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Object reference not set to an instance of &amp;nbsp;an object.&lt;/p&gt;&lt;p&gt;&lt;b&gt;here is my Upload Button Code code&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre name="code" class="c-sharp"&gt;protected void Button2_Click(object sender, EventArgs e)
    {
        string strFileName;
        strFileName = FileField.PostedFile.FileName;
        string c = System.IO.Path.GetFileName(strFileName);
        try
        {
            Image2.Visible = true;
            FileField.PostedFile.SaveAs(&amp;quot;C:\\UploadedUserFiles\\&amp;quot; + c);
            Image2.Visible = false;
            Label2.Visible = true;
        }
        catch (Exception exp)
        {
            Label2.Text = exp.Message.ToString();
            Label2.Visible = true;
        }
    }&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Here is My page Code&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;pre name="code" class="c-sharp"&gt;&amp;lt;table cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; class=&amp;quot;style8&amp;quot;&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *Name:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox2&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                           &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *Email Address:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox4&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *Contact Number:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                               &amp;lt;asp:TextBox ID=&amp;quot;TextBox5&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt; &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                *City:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox6&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                Your CV:&amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:UpdatePanel ID=&amp;quot;UpdatePanel1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
                                                    &amp;lt;ContentTemplate&amp;gt;
                                                        &amp;lt;asp:FileUpload ID=&amp;quot;FileField&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;247px&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
                                                        &amp;lt;asp:Button ID=&amp;quot;Button2&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Upload&amp;quot; Height=&amp;quot;20px&amp;quot; 
                                                            onclick=&amp;quot;Button2_Click&amp;quot; /&amp;gt;&amp;lt;asp:Image ID=&amp;quot;Image2&amp;quot; runat=&amp;quot;server&amp;quot; Visible=&amp;quot;False&amp;quot; /&amp;gt;
                                                        &amp;lt;asp:Label ID=&amp;quot;Label2&amp;quot; runat=&amp;quot;server&amp;quot; Font-Names=&amp;quot;Arial&amp;quot; Font-Size=&amp;quot;10pt&amp;quot; 
                                                            ForeColor=&amp;quot;#535353&amp;quot; Text=&amp;quot;File Uploaded Successfully&amp;quot; Visible=&amp;quot;False&amp;quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;
                                                    &amp;lt;/ContentTemplate&amp;gt;
                                                &amp;lt;/asp:UpdatePanel&amp;gt;
                                                
                                            &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; 
                                                width=&amp;quot;150px&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;
                                                Describe Yourself:                              &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:TextBox ID=&amp;quot;TextBox8&amp;quot; runat=&amp;quot;server&amp;quot; Width=&amp;quot;250px&amp;quot; Height=&amp;quot;200px&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; 
                                                width=&amp;quot;150px&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;
                                                &amp;nbsp;&amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: right; padding-right: 10px; height: 30px&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td width=&amp;quot;275px&amp;quot;&amp;gt;
                                                &amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Apply&amp;quot; 
                                                    onclick=&amp;quot;Button1_Click&amp;quot; /&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FF0000; padding-left: 10px; text-align: left&amp;quot; width=&amp;quot;150px&amp;quot;&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                        &amp;lt;tr&amp;gt;
                                            &amp;lt;td style=&amp;quot;font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #535353; text-align: left; height: 30px; padding-left: 10px;&amp;quot; 
                                                colspan=&amp;quot;3&amp;quot;&amp;gt;
                                                &amp;lt;asp:Label ID=&amp;quot;Label1&amp;quot; runat=&amp;quot;server&amp;quot; ForeColor=&amp;quot;#009999&amp;quot; 
                                                    Text=&amp;quot;* Your Resume Send Successfully.&amp;quot; Visible=&amp;quot;False&amp;quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;
                                                &amp;lt;/td&amp;gt;
                                        &amp;lt;/tr&amp;gt;
                                    &amp;lt;/table&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Thanks in Advance&lt;/p&gt;</description></item></channel></rss>