Gautam Buddha Temple Varanasi,Varanasi - Buddhist Pilgrimage

Saturday, September 11, 2010

Bind dropdownlist default value

On RowDataBound
ddlCountry.SelectedValue = Ds.Tables[0].Rows[e.Row.RowIndex]["CountryId"].ToString();

On SelectedIndexChanged
ddlRGroup.SelectedValue = Ds.Tables[0].Rows[0]["RatingId"].ToString();

if (!Page.IsPostBack)
SqlDataReader dr = SqlHelper.ExecuteReader(connectionString, "tblFormula_Select", Convert.ToInt32(ViewState["CKFId"]), "S");
ddlTemp.SelectedValue = dr["TemplateId"].ToString();

1 comment:

  1. This is an amazing blog,it gives very helpful messages to us.Besides that Wisen has established as Best Javascript Training in Chennai . or learn thru JavaScript Online Training India. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete