把C#代码放JavaSript 上的问题
asp.net 文件____________________________________
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Hot.aspx.cs" Inherits="InsertHtml_Hot" %>
<form id="form1" runat="server">
document.write ('<ul>');
<asp:Repeater ID="dgOutput" runat="server" >
<ItemTemplate>
document.write ('<li><a href="/vip/show.asp?id=<%#DataBinder.Eval(Container.DataItem, "ArticleID")%>" title="<%#DataBinder.Eval(Container.DataItem, "title")%>"><%#DataBinder.Eval(Container.DataItem, "title")%></a></li>');
</ItemTemplate>
</asp:Repeater>
document.write ('</ul>');
</form>
________________________________
浏览器查看代码的时候会生成这样的代码
<form name="form1" method="post" action="Hot.aspx?ClassID=20" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjEyODY5ODc3Ng9kFgJmD2QWAgIBDxYCHgtfIUl0ZW1Db3VudAIKFhRmD2QWAmYPFQMFOTAzNjId56aP5bCU5pGp5pav5o6i5qGI5YWo6ZuGKOS4gCkd56aP5bCU5pGp5pav5o6i5qGI5YWo6ZuGKOS4gClkAgEPZBYCZg8VAwM3MTY5VGhlIENvbXBsZXRlIFdyaXRpbmdzIG9mIENoYXJsZXMgRHVkbGV5IFdhcm5lcihWb2x1bWUgSVYpOVRoZSBDb21wbGV0ZSBXcml0aW5ncyBvZiBDaGFybGVzIER1ZGxleSBXYXJuZXIoVm9sdW1lIElWKWQCAg9kFgJmDxUDAzY1OSJUaGUgTWFzdGVyIG9mIEJhbGxhbnRyYWUoVm9sdW1lIEkpIlRoZSBNYXN0ZXIgb2YgQmFsbGFudHJhZShWb2x1bWUgSSlkAgMPZBYCZg8VAwM5NjEJ5aSc5LiO5pi8CeWknOS4juaYvGQCBA9kFgJmDxUDAzk2MAbmlrDmmJ8G5paw5pifZAIFD2QWAmYPFQMDNjU4KE1yLiBTcG9uZ2XigJlzIFNwb3J0aW5nIFRvdXIoVm9sdW1lIElJSSkoTXIuIFNwb25nZeKAmXMgU3BvcnRpbmcgVG91cihWb2x1bWUgSUlJKWQCBg9kFgJmDxUDBDI4NDIM5oOF5Lq66KeE5YiZDOaDheS6uuinhOWImWQCBw9kFgJmDxUDBDI4NDEQV2l0aGluIHRoZSBUaWRlcxBXaXRoaW4gdGhlIFRpZGVzZAIID2QWAmYPFQMDOTkxDOWxseaipuawtOaipgzlsbHmoqbmsLTmoqZkAgkPZBYCZg8VAwM5OTAl546L5bCP5rOi5YWo6ZuG56ys5LqU5Y23OuWvu+aJvuaXoOWPjCXnjovlsI/ms6Llhajpm4bnrKzkupTljbc65a+75om+5peg5Y+MZGTnUlV3QNmeM8lIMHAftlBVGt3i9w==" />
</div>
document.write ('<ul">');
document.write ('<li><a href="/vip/show.asp?id=90362" title="福尔摩斯探案全集(一)">福尔摩斯探案全集(一)</a></li>');
document.write ('<li><a href="/vip/show.asp?id=716" title="The Complete Writings of Charles Dudley Warner(Volume IV)">The Complete Writings of Charles Dudley Warner(Volume IV)</a></li>');
document.write ('<li><a href="/vip/show.asp?id=659" title="The Master of Ballantrae(Volume I)">The Master of Ballantrae(Volume I)</a></li>');
document.write ('</ul>');
</form>
这样的话就不是纯JavaScript 代码了,当在静态网页上放上
<script language="javascript" src="/InsertHtml/Hot.aspx?ClassID=2"></script> 这样的代码 的时候就显示不出来。有什么办法? --------------------编程问答-------------------- 新建一个 一般处理文件
补充:.NET技术 , C#