日期:2014-05-18  浏览次数:20466 次

GridView1列绑定JS方法
//这是GRIDVIEW绑定列
<ItemTemplate>
 <a href="return gl_newswindow(" <%# Bind("wldm") %> "," <%# Bind("jydm") %>) "'>设置</a>
 </ItemTemplate>
//JS
<script type="text/javascript">
  function gl_newswindow(wldm,jydm)
{
  window.showModalDialog("../sl_zj_ylkcbz.aspx?wldm=wldm && jydm=jydm,"new","dialogHeight: 370px; dialogWidth: 590px; edge: Raised; center: Yes; help: No; resizable: no; status: no;");

</script>

这样写出错,应该怎么写呢?

请高手帮忙

------解决方案--------------------
HTML code

<a href=<%# string.Format("return gl_newswindow('{0}','{1}');",Eval("wldm"),Eval("jydm")) %> >设置</a>