Home
Manage Your Code
Snippet: FindControl in a Template (C#)
Title: FindControl in a Template Language: C#
Description: To use in a Grid, Dropdownlist, etc Views: 256
Author: Paulo Almeida Date Added: 1/26/2008
Copy Code  
1if ((int)((DropDownList)this.dtvNew.FindControl("ddlNWA")).SelectedItem.Value != -1) 
2{ 
3   nwaTableAdapter.Insert((int)Session("useridcountry"), id_basin, (int)((DropDownList)this.dtvNew.FindControl("ddlNWA")).SelectedItem.Value); 
4}