title: Click Event Handler of ASP.Net Button in User Control is not Working
body: <p>My User Control in my ASP.Net application has a Button named button. I've added a click event to it like this:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e) {
      if (!IsPostBack) {
          button.Click += (object o, EventArgs ea) =&gt; {
              Response.Redirect("~/Post.aspx?type=" + Type + "&amp;id=" + PostID);
          };
      }
  }
  </code></pre>
  
  <p>But whenever I click on the Button it does nothing but reloads the page. What is the problem with my code?</p>