first time here.
I'm having trouble with c# inline if statement in aspx page, i'm trying to call a different onClick method depending if my Parent has Child or not, however, for some reason, it adds a ; in the code but the fonction is never called, however, with the same if statment in a text field, everything shoes fine without any semicolon.
any idea why?
here are both OnClick and text code snippet
OnClick='<%#(int)Eval("nbChild") != 0 ? "Expend" : "AddSub" %>'
Text='<%#(int)Eval("nbChild")!=0 ? "Expend":"AddSub" %>'
Aucun commentaire:
Enregistrer un commentaire