In the html, put something like this for the text value:
In the code, make a public function that returns a string and accepts a boolean:Code:<%# MyMethod((bool) DataBinder.Eval(Container.DataItem, "Color")) %>
I didn't get to test the code, but you understand don't you?Code:public string MyMethod(bool isColor) { if(isColor) return "Color"; else return "Black and White"; }
If you need more help, I can acutally do it in VS and send you the exact code.




Reply With Quote