Hi,
I am currently using the base class GetType() in the
following way and was woundering if there was a different
way of looking at types and doing a comparison for
equality.
Thanks Ron
foreach(System. Web.UI.Control ctl in this.Controls)
{
if(ctl.GetType( ).ToString()
== "System.Web.UI. WebControls.Dro pDownList")
{
DropDownList ddl = (DropDownList)c tl.FindControl
("ddlAddNewLoca tion");
if(ddl != null)
{
locationId = int.Parse(ddl.S electedItem.Val ue);
}
}
}
I am currently using the base class GetType() in the
following way and was woundering if there was a different
way of looking at types and doing a comparison for
equality.
Thanks Ron
foreach(System. Web.UI.Control ctl in this.Controls)
{
if(ctl.GetType( ).ToString()
== "System.Web.UI. WebControls.Dro pDownList")
{
DropDownList ddl = (DropDownList)c tl.FindControl
("ddlAddNewLoca tion");
if(ddl != null)
{
locationId = int.Parse(ddl.S electedItem.Val ue);
}
}
}
Comment