日期:2014-05-19  浏览次数:20408 次

shtml是否可以调用aspx页面?该如何调用?
如题
<!--#exec   cgi= "../../HtmlEssential.aspx "-->  
看了网上的教程,我这样写,可什么都没有输出!
可以调用吗?需要设置什么吗?

------解决方案--------------------
<script language = "javascript " src= " <%=ApplicationPath %> /component/ShowNewBlog.aspx?username= <%=username %> "> </script>

这样调用

在ShowNewBlog.aspx页面中response输出

------解决方案--------------------
<script language = "javascript " src= " <%=ApplicationPath %> /component/ShowNewBlog.aspx?username= <%=username %> "> </script>

ShowNewBlog.aspx页面

Response.Write( "var s1=\ "\ "; ");
Response.Write( "s1+=\ " <div class= 'panel-content '> <UL> \ "; ");
foreach (DataRow dr in ds.Tables[0].Rows)
{
title = dr[ "title "].ToString();
filename = dr[ "filename "].ToString();
Response.Write( "s1+=\ " <li> <a href= ' " + Application[ "path "] + "/ " + filename + " ' title= ' " + title + " '> " + title + " </a> <br> \ "; ");

}
Response.Write( "s1+=\ " </UL> </div> \ "; ");
Response.Write( "document.getElementById(\ "ShowNewBlog\ ").innerHTML =s1; ");

然后再调用页面添加id=ShowNewBlog的div

更多精彩尽在天下博客 www.tianxiaboke.com