i have the following code that deos not work: I have done this in vb wher i
include an item as object and then am able to find it correctly. Not working
here!!!
1. trying to just find the control to get its type: if
((gvr.FindControl(objPosNeg1) == "System.Web.UI.WebControls.HyperLink"))
i'll start here and thanks
CODE:
void fn_setLBLToBoldLOCAL(GridViewRow gvr, object objPosNeg1, object
objPosNeg2, string szPosNeg)
{
if (((DataRowView)gvr.DataItem).Row[szPosNeg] == "Y")
{
if ((gvr.FindControl(objPosNeg1) ==
"System.Web.UI.WebControls.HyperLink"))
{
object obj = gvr.FindControl(objPosNeg1);
((HyperLink)(obj)).Font.Bold = true;
}
if ((gvr.FindControl(objPosNeg2).GetType.ToString ==
"System.Web.UI.WebControls.Label"))
{
object obj = gvr.FindControl(objPosNeg2);
((Label)(obj)).Font.Bold = true;
}
}
}
}
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)
kes