title: Upload image in folder and rename it
body: <p>I have created a interface where user will select and upload image. But how can i rename and save image in server folder(images), and display it again on my image gallery page. My website is developed in asp.net c#.Suggest me some ideas or links to refer.</p>
  
  <p>upload button click code below:</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
      if (FileUpload1.HasFile)
      {
          string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
          FileUpload1.PostedFile.SaveAs(Server.MapPath("~/uploads/") + fileName);
          Response.Redirect(Request.Url.AbsoluteUri);
      }
  }
  </code></pre>
  
  <p>Thanks.</p>