public class Dashboard : System.Web.UI.Page { public String getTxt(string xID,String xType) { String ObjText; switch (xType.ToUpper()) { case "DROPDOWNLIST": //foreach (Control c in Page.Controls) //{ // if (c.ID == xID) // { // } //} DropDownList dlist = (DropDownList) Page.FindControl(xID); if (dlist != null) ObjText = dlist.Text; else ObjText = ""; break; default: ObjText = ""; break; } return ObjText; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)