title: How to display alert prompt using c# ASP.NET?
body: <p>I can not show the alert message after data submitted inside DB using c# ASP.NET.I am explaining my code below.</p>
  
  <blockquote>
    <p>mission.aspx.cs:</p>
  </blockquote>
  
  <pre><code>protected void submit_Click(object sender, EventArgs e)
  {
  
      missionBO objMissionBo = new missionBO();
      if (HiddenField1.Value == "")
      {
          objMissionBo.heading = TextBox1.Text.Trim();
          if (insertimage.HasFile)
          {
              //int length = insertimage.PostedFile.ContentLength;
              string filename = insertimage.FileName;
              insertimage.PostedFile.SaveAs(Server.MapPath(@"~\Upload\" + filename.Trim()));
              string path = filename.Trim();
              //byte[] imgbyte = new byte[length];
              //HttpPostedFile img = insertimage.PostedFile;
              //img.InputStream.Read(imgbyte, 0, length);
              objMissionBo.image = path;
  
          }
          objMissionBo.description = TextBox2.Text.Trim();
          missionvissionBL objMissionBL = new missionvissionBL();
          string action = "insert";
          int result = objMissionBL.insertMissionData(objMissionBo, action);
          if (result == 1)
          {
              ClientScript.RegisterStartupScript(this.GetType(), "prompt", "var value = prompt('Data inserted successfully.'); storeinput(value);", true);
              clearAll();
              Response.Redirect("missionvision.aspx");
          }
          else
          {
              ClientScript.RegisterStartupScript(this.GetType(), "prompt", "var value = prompt('Data could not inserted successfully.'); storeinput(value);", true);
          }
      }
  
  &lt;script&gt;
      function storeinput(value) {
          console.log('value',value);
          document.getElementById("&lt;%=hidValue.ClientID%&gt;").value = value;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>My requirement here, is that I have show the success/ error message after every submit of value.</p>