<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gom68</author_name>
  <author_url>https://blog.hatena.ne.jp/gom68/</author_url>
  <blog_title>gom68の日記</blog_title>
  <blog_url>https://gom.hatenablog.com/</blog_url>
  <categories>
    <anon>ASP</anon>
    <anon>.NET</anon>
  </categories>
  <description>GridViewでデータバインドして、Eval値を表示させたい場合。 特にテンプレートなどで連結式を書いている時に、 型 'DBNull' から型 'Boolean' への変換は無効です。というエラーが出るときが。DBNullの場合は他の値を表示させたい！ そんなとき、ifは使えないけれど、三項演算子が使えるみたい。 下の例は、Nullの場合にFalseを返す。 VB.NET IIF(Eval(&quot;hoge&quot;), False, Eval(&quot;hoge&quot;)) C# (Eval(&quot;hoge&quot;) == System.DBNull)? False: Eval(&quot;hoge&quot;) 複数の箇所で書く場合には、メソ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20071219%2F1198030669&quot; title=&quot;ASP.NETの連結式内での条件判定 - gom68の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-12-19 11:17:49</published>
  <title>ASP.NETの連結式内での条件判定</title>
  <type>rich</type>
  <url>https://gom.hatenablog.com/entry/20071219/1198030669</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
