But if condition is not support by Eval
Not able to use if condition with <%#Eval("sPhone")%>
see this code
-----------IN HTMl code---------------
<%#ReplaceField(Eval("sWebSite").ToString())%>
-----------IN code behind code--------
public string ReplaceField(string stat)
{
string newValue = "";
if (stat == "N/A")
{
newValue="
}
else
{
newValue = "" + stat + "";
}
return newValue;
}
No comments :
Post a Comment