Hi,
I have the following code line:
(string)ViewDat a["Tags"] ?? ViewData.Model. Tags.ToString()
How can I do something similar for a boolean type variable. I tried:
(bool)ViewData["IsPublishe d"] ?? ViewData.Model. IsPublished
However it says ?? cannot be used with boolean type variable.
Thanks,
Miguel
I have the following code line:
(string)ViewDat a["Tags"] ?? ViewData.Model. Tags.ToString()
How can I do something similar for a boolean type variable. I tried:
(bool)ViewData["IsPublishe d"] ?? ViewData.Model. IsPublished
However it says ?? cannot be used with boolean type variable.
Thanks,
Miguel
Comment