在c#中 @“” 可以完整的输出你想要的字符
可是如果中间有引号的话要怎么转义呢?我不用@的话 \可以转义 ,可是还是不能得到结果例子:
<a onclick="OpenNamedScrollingPopup('propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,"PropertyId") %>', 'VirtualTour', 720 , 520);" target='VirtualTour' href='propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,"PropertyId") %>'>View</a>用转义后的
"<a onclick=\"OpenNamedScrollingPopup('propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,\"PropertyId\") %>', 'VirtualTour', 720 , 520);\" target='VirtualTour' href='propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,\"PropertyId\") %>'>View</a>";请大家帮忙了
解决马上给分
可是如果中间有引号的话要怎么转义呢?我不用@的话 \可以转义 ,可是还是不能得到结果例子:
<a onclick="OpenNamedScrollingPopup('propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,"PropertyId") %>', 'VirtualTour', 720 , 520);" target='VirtualTour' href='propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,"PropertyId") %>'>View</a>用转义后的
"<a onclick=\"OpenNamedScrollingPopup('propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,\"PropertyId\") %>', 'VirtualTour', 720 , 520);\" target='VirtualTour' href='propertypublish.aspx?propertyId=<%# DataBinder.Eval(Container.DataItem,\"PropertyId\") %>'>View</a>";请大家帮忙了
解决马上给分
@"He said: ""Hello!"""