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

关于repeater内控件的事件绑定
前台代码:
<asp:repeater   id= "ContentViewRepeater "   runat= "server ">
<HEADERTEMPLATE>
<TR   class= "Table_blue_bg2 "   height= "30 ">
<TD   style= "HEIGHT:   27px "   align= "center "   colSpan= "2 "> 短消息 </TD>
</TR>
</HEADERTEMPLATE>
<ITEMTEMPLATE>
<TR   class= "Table_blue_bg1 "   height= "30 ">
<TD   style= "HEIGHT:   27px "   align= "left "   colSpan= "2 "> <IMG   height= "14 "   src= "../images/false.gif "   width= "21 "   border= "0 "> 本消息由 <%#DataBinder.Eval(Container.DataItem, "FULL_NAME ")%> 在 <%#DataBinder.Eval(Container.DataItem, "SEND_TIME ")%> 发送给您 </TD>
</TR>
<TR   class= "listout "   onmouseover= "javacript:className= 'listover ' "   onmouseout= "javacript:className= 'listout ' ">
<TD   style= "HEIGHT:   28px "   align= "right "   width= "17% "> 标   题:
</TD>
<TD   style= "HEIGHT:   28px "   align= "left "   width= "83% "> <%#DataBinder.Eval(Container.DataItem, "TITLE ")%> </TD>
</TR>
<TR   class= "listout "   onmouseover= "javacript:className= 'listover ' "   onmouseout= "javacript:className= 'listout ' ">
<TD   align= "right "   width= "17% "> 附件: </TD>
<TD   align= "left ">
<INPUT   class=input3   id=btnDownFile   type=button   value= " <%#DataBinder.Eval(Container.DataItem, "FILE_NAME ")%> "   name=btnDownFile   runat= "server ">
</TD>
</TR>
<TR>
<TD   align= "right "   width= "17% "> 内容:
</TD>
<TD   align= "left "> <TEXTAREA   style= "WIDTH:   410px;   HEIGHT:   88px "   name= "modifyReason "> <%#DataBinder.Eval(Container.DataItem, "CONTENT ")%> </TEXTAREA> </TD>
</TR>
</ITEMTEMPLATE>
<FOOTERTEMPLATE>
</FOOTERTEMPLATE>
</asp:repeater>
后台代码:
private   void   Page_Load(object   sender,   System.EventArgs   e)
{
messageID=Request.QueryString.Get( "ID ");

sql   =   "select   distinct   T_BBSMSG.TITLE,T_BBSMSG.CONTENT,T_BBSMSG.SEND_TIME,T_BBSMSG_FILE.[FILE_ID], ";
sql+= "   T_BBSMSG_FILE.[FILE_NAME],T_BBSMSG_FILE.[FILE_LENGTH],T_USER.FULL_NAME   from   T_BBSMSG ";
sql+= "   left   join   T_BBSMSG_FILE   on   T_BBSMSG.[file_ID]=T_BBSMSG_FILE.[file_ID] ";
sql+= "   left   join   T_BBSMSG_USER   ON   T_BBSMSG.MESSAGE_ID   =   T_BBSMSG_USER.MESSAGE_ID ";
sql+= "   left   join   T_USER   on   T_BBSMSG_USER.SEND_USER_ID   =   T_USER.[USER_ID] ";
sql   += "   where &nbs