protected void drpModulName_SelectedIndexChanged(object sender, EventArgs e) { try { string Ocode = Convert.ToString(((SessionUser)Session["SessionUser"]).OCode); int moduleId = Convert.ToInt16(drpModulName.SelectedValue); List <RCategory> categoryes = categoryBll.CategoryesForgrid(Ocode, moduleId).ToList(); if (categoryes.Count > 0) { gridviewCategory.DataSource = categoryes; gridviewCategory.DataBind(); } } catch (Exception) { throw; } }