/ Published in: C#
You can change your dynamic binding eval text with this method.
This method should be in same codebehind
This method should be in same codebehind
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//Codebehind method public string ChangeValue(string val) { string ret= string.Empty; if (val== "True") { ret= "In Stock"; } else { ret= "Not in stock"; } return ret; } <asp:Label ID="Label3" runat="server" Text='<%# ChangeValue(Eval("isStock").ToString())%>'></asp:Label>