Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello

I have a GridView With a column contains a bit value of 0 or 1.
I want to show the word Male if the value is 0 and Female if the value is 1 using C# inline server tags.

Thank you
Posted
Comments
Sergey Alexandrovich Kryukov 28-Jan-13 19:33pm    
What is "inline server tags"?
—SA

Its an embedded code using the <% %> symbols.
 
Share this answer
 
I "think" I understand (I might be wrong)...
Add(in case of a Label)...
<asp:label id="lblColumnValue" text=" <%# DataBinder.Eval (Container.DataItem, "DataBaseValue(defined)")%>" runat="server" xmlns:asp="#unknown"></asp:label>
 
Share this answer
 
v2
Are you talking about <![CDATA[<% ... %>]]> blocks?
Refer the links below:
Embedded Code and Inline Server Tags[^]
A quick reference for the ASP.NET inline server tags[^]


Hope it helps!
--Amit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900