pcplayer:
象ASP只直接把带码写在页面里,当然知道自己的代码在操作页面的哪个位置。Asp.net也有直接把代码写在页面上的。但C#的页面和代码分离,我不知道如何让代码直接操作页面了。
[阅读: 913] 2004-12-31 07:26:12
比如代码直接在页面里,可以这样写:
do while not rsArticle.eof
strTemp=""
'strTemp = strTemp & ""
strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=25% rowspan=5>"
strTemp= strTemp & "<div align=center><a href=ArticleShow.asp?ArticleID=" & rsArticle("articleid") & ">"
strTemp= strTemp & "<img border=0 src=" & rsArticle("DefaultPicUrl") & " width=120 height=80>"
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "<td width=20% height=18>"
等等。
C#里只有操作页面上的组件。在C#里直接写页面该怎么整?