Forum Discussion

BizSnype's avatar
BizSnype
Copper Contributor
Jan 14, 2022

Escaping double quotes

I'm trying to show/hide a div based on a dynamic value and I've escaped the double quotes in my code:

 

 

 

<div id="showhide"  @(singleCategory.ShowTime == "1" ? "style=\"display:none\"" : "")>

 

 

 

 

However, it doesn't work in the browser and when I do a View Page Source I see:

 

 

 

<div id="showhide"  style=&quot;display:none&quot;>

 

 

 


Thanks for any assistance,
JB

No RepliesBe the first to reply