protected void btnOk_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(upnlRatesGrid, upnlRatesGrid.GetType(), Guid.NewGuid().ToString(), "$(document).ready(function(){CloseDialog();});", true); RateChosenEventArgs args = new RateChosenEventArgs(); args.RateValue = "so far soo good"; if (RateChosen != null) { RateChosen(this,args); } }
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { if (ViewState["Rates"] != null) { ScriptManager.RegisterStartupScript(upnlRatesGrid, upnlRatesGrid.GetType(), Guid.NewGuid().ToString(), "$(document).ready(function(){CloseDialog();});", true); RateChosenEventArgs args = new RateChosenEventArgs(); List<BusinessObjects.Rates.Rate> L = (List<BusinessObjects.Rates.Rate>)ViewState["Rates"]; args.RateValue =L[GridView1.SelectedIndex].DollarValue.ToString(); if (RateChosen != null) { RateChosen(this, args); } } }