title: Itemcommand not firing on button click event in a datalist using c#
body: <p>this is my offer.aspx inherits from masterpage
  ' /></p>
  
  <p>my .cs file</p>
  
  <p>protected void Page_Load(object sender, EventArgs e)
      {
          if (!IsPostBack)
          {
             offerlistbind();
          }
      }</p>
  
  <pre><code>public void offerlistbind()
  {
      db1.strCommand = "  select Offer.OfferID, Offer.OfferName,Offer.Amount,Offer.FromDate,Offer.ToDate,Offer.Description,bm_package.PackageName,bm_country.Country from Offer inner join  bm_package on Offer.PackageID=bm_package.PackageID inner join bm_country on Offer.CountryID=bm_country.CountryID";
      offerlistnew.DataSource = db1.DataSet();
      offerlistnew.DataBind();
  
  }
  </code></pre>
  
  <p>if i click the button instead of firing item command event item dataBound event is working
   protected void offerlistnew_ItemCommand1(object source, DataListCommandEventArgs e)
      {
          if (e.CommandName == "subscribe")
          {
              int ofid = Convert.ToInt32(e.CommandArgument);
              Response.Redirect("<a href="http://ecom.bom.tv/default.aspx?Offer=" rel="nofollow">http://ecom.bom.tv/default.aspx?Offer=</a>" + ofid + "");
          }
      }</p>