title: .net click on image button not working in Internet Explorer but in Firefox
body: <p>I have written C# code for ascx. I am trying to send an email on click of image button which works in Mozilla Firefox but not in Internet Explorer.</p>
  
  <p>This function is called on button click:</p>
  
  <pre><code>&lt;%@ Control Language="C#" %&gt;
  &lt;%@ Import Namespace="System" %&gt;
  &lt;%@ Import Namespace="System.Web.UI.WebControls" %&gt;
  &lt;%@ Import Namespace="System.Globalization" %&gt;
  
  &lt;script language="c#" runat="server"&gt;
      protected void btnSubmit_Click(object sender, EventArgs e)
      {
          if (Page.IsValid)
          {
              string from = "manoj.singh@espireinfo.com";
              string to = "manoj.singh@espireinfo.com";
              string subject = "Keep me Updated";
              string sendguide = "";
  
              if (optsendguide.Checked)
              {
                  sendguide = "Yes Please send me";
  
              }
              else
              {
                  sendguide = "No Please don't send me";
              }
  
              // build up the body text
              string body = "&lt;html&gt;&lt;body&gt;";
              body += String.Format("&lt;div&gt;Title: {0} &lt;/div&gt;", title.Text);
              body += String.Format("&lt;div&gt;First Name: {0} &lt;/div&gt;",firstname.Value);
              body += String.Format("&lt;div&gt;Sur Name: {0} &lt;/div&gt;", surname.Value);
              body += String.Format("&lt;div&gt;Email address: {0} &lt;/div&gt;", email.Value);
              body += String.Format("&lt;div&gt;Break Type: {0} &lt;/div&gt;", breakTypeDescription.Text);
              body += String.Format("&lt;div&gt;Big weekends guide: {0} &lt;/div&gt;", sendguide);
              body += "&lt;/body&gt;&lt;/html&gt;";
  
              string error = Utilities.SendEmail(to, from, subject, body);
              if (error == "") // success
              {
                  Response.Redirect("index.aspx");
              }
              else // error
              {
                  Response.Write(error);
              }
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Markup:</p>
  
  <pre><code>&lt;div class="form_elm_button"&gt;
      &lt;asp:ImageButton ID="SubmitButton"
                       runat="server"
                       Text="Submit"
                       ImageUrl="/images/17-6164button_submit.png"
                       OnClick="btnSubmit_Click"
                       CausesValidation="true"/&gt;
  &lt;/div&gt;
  </code></pre>