如下有一段html文本:
   <div id="Layer1" style="Z-INDEX:1; LEFT:111px; WIDTH:190px; POSITION:absolute; TOP:21px; HEIGHT:23px"><img src="image/111.ico" onmouseover="javascipt:showPopupMenu(this, popMenu, '<%=sMemo%>>')" onmouseout="hidePopupMenu(this, popMenu)" ></div>
我想在c#中以字符串形式体现,但总是不能在PlaceHolder中正常调用函数,请大家帮忙解决.
我的写法是:
   string showinfo="<div id='Layer1' style='Z-INDEX:1; LEFT:111px; WIDTH:190px; POSITION:absolute; TOP:21px; HEIGHT:23px'>"+"<img src='image/topsoft.ico' onmouseover="+"'showPopupMenu(this, popMenu,"+" '<%=sMemo%>>'"+")'"+" onmouseout='hidePopupMenu(this, popMenu)' ></div>"

解决方案 »

  1.   

    string showinfo="<div id='Layer1' style='Z-INDEX:1; LEFT:111px; WIDTH:190px; POSITION:absolute; TOP:21px; HEIGHT:23px'>"+"<img src='image/topsoft.ico' onmouseover="+"'showPopupMenu(this, popMenu,\"" + sMemo + "\")'"+" onmouseout='hidePopupMenu(this, popMenu)' ></div>";
      

  2.   

    string showinfo="<div id='Layer1' style='Z-INDEX:1; LEFT:111px; WIDTH:190px; POSITION:absolute; TOP:21px; HEIGHT:23px'>"+"<img src='image/topsoft.ico' onmouseover="+"'showPopupMenu(this, popMenu,\"<%=sMemo%>\")'"+" onmouseout='hidePopupMenu(this, popMenu)' ></div>";