asp.net 用Repeater控件制作的简单…

论坛 期权论坛     
选择匿名的用户   2021-6-2 15:54   105   0
<div class="articalContent" id="sina_keyword_ad_area2">   
<title></title>   
<p><strong><font size="5">发表留言模块</font></strong></p>
<p><strong><em>前台:</em></strong></p>
<p>&lt;%&#64; Page Language&#61;&#34;C#&#34;  <wbr></wbr> CodeFile&#61;&#34;Default.aspx.cs&#34; Inherits&#61;&#34;_Default&#34; %&gt;</p>
<p>&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;</p>
<p>&lt;html xmlns&#61;&#34;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&#34; &gt;<br> &lt;head runat&#61;&#34;server&#34;&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;title&gt;无标题页&lt;/title&gt;<br> &lt;/head&gt;<br> &lt;body&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;form id&#61;&#34;form1&#34; runat&#61;&#34;server&#34;&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;div&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;strong&gt;发表留言:&lt;/strong&gt;&lt;br /&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> 用户名:&lt;asp:TextBox ID&#61;&#34;name&#34; runat&#61;&#34;server&#34;&gt;&lt;/asp:TextBox&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:RequiredFieldValidator ID&#61;&#34;RequiredFieldValidator1&#34; runat&#61;&#34;server&#34; ControlToValidate&#61;&#34;name&#34;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> ErrorMessage&#61;&#34;用户名不能为空&#34;&gt;&lt;/asp:RequiredFieldValidator&gt;&lt;br /&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> 内容:&lt;asp:TextBox ID&#61;&#34;content&#34; runat&#61;&#34;server&#34;&gt;&lt;/asp:TextBox&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:RequiredFieldValidator ID&#61;&#34;RequiredFieldValidator3&#34; runat&#61;&#34;server&#34; ControlToValidate&#61;&#34;content&#34;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> ErrorMessage&#61;&#34;内容不能为空&#34;&gt;&lt;/asp:RequiredFieldValidator&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:Button ID&#61;&#34;Button1&#34; runat&#61;&#34;server&#34; OnClick&#61;&#34;Button1_Click&#34; Text&#61;&#34;发表&#34; /&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;a href&#61;&#34;admin.aspx&#34;&gt;转到管理员登陆界面&lt;/a&gt;&lt;br /&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;br /&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:Repeater ID&#61;&#34;MyRepeater&#34; runat&#61;&#34;server&#34;&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;ItemTemplate&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;table width&#61;&#34;800&#34; style&#61;&#34;background-color:GrayText&#34;&gt;&lt;tr&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;td align&#61;&#34;left&#34;&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:Label ID&#61;&#34;Label3&#34; runat&#61;&#34;server&#34; Text&#61;&#34;主题:&#34;&gt;&lt;/asp:Label&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;%#DataBinder.eval_r(Container.DataItem,&#34;content&#34;) %&gt;&lt;/td&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;td align&#61;&#34;center&#34;&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:Label ID&#61;&#34;Label4&#34; runat&#61;&#34;server&#34; Text&#61;&#34;作者:&#34;&gt;&lt;/asp:Label&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;%#DataBinder.eval_r(Container.DataItem,&#34;name&#34;) %&gt;&lt;/td&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;td align&#61;&#34;right&#34;&gt;<br>  <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> <wbr></wbr> &lt;asp:Label ID&#61;&#34;Label5&#34; runat&#61;&#34;server&#34; Text&#61;&#34;发表时间:&#34;&gt;&lt;/asp:Label&gt;<br>  <wbr></wbr> <wbr></wbr>
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP