this is my offer.aspx inherits from masterpage ' />
my .cs file
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { offerlistbind(); } }
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();
}
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("http://ecom.bom.tv/default.aspx?Offer=" + ofid + ""); } }