Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のプロジェクトでは、「ビット」タイプ (true、false) のデータを mssql データベースに保存し、それらを gridview (asp.net - c#) に表示します。それらはチェックボックスとして表示されました。質問:ホストから (データベースからではなく)この列のグリッドビューに画像を表示できますか? 例:値が True の場合 pic1.png 列に表示 ?!
使用するVisibleイメージ コントロールのプロパティを使用します。
Visible
<asp:Image ID="myImage" runat="server" ImageUrl="~/Images/myImage.gif" Visible='<%# DataBinder.Eval(Container.DataItem, "bitColumn") == null ? false: DataBinder.Eval(Container.DataItem, "bitColumn") %>' />