论坛发贴系统的有关问题(急~~~~~~~~~~)

ricky8509 2006-10-31 08:43:10
有一个TEXTBOX, 下面有一些图片按钮IMAGEBUTTON, 一按图片, 不刷新页面, TEXTBOX里就有图片的UBB CODE, 请问这个问题如何实现~?
...全文
77 7 打赏 收藏 举报
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
hanchi8008 2006-11-03
  • 打赏
  • 举报
回复
用 js写呀!<image onclick=aa()>
<script>
function aa()
{
text.value = document.....
}

<script/>
股神 2006-10-31
  • 打赏
  • 举报
回复
ricky8509 2006-10-31
  • 打赏
  • 举报
回复
这是ASPX.CS里IMAGEBUTTON事件代码:
private void imgSelect(object sender, System.Web.UI.WebControls.CommandEventArgs e)
{
txtContent.Text+="[img]"+e.CommandName+"[/img]";
}
leocool 2006-10-31
  • 打赏
  • 举报
回复
看看别的论坛是怎么做的(要把当中的js提出来很麻烦) 或者用fckeditor代替 界面更友好
ricky8509 2006-10-31
  • 打赏
  • 举报
回复
晕是HTML代码:
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="DisplayComment.ascx.cs" Inherits="ITWebsite.Common.Controls.DisplayComment" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<LINK href="../../../ITWebsite.GeneralEvaluationSystem/Test/test.css" type="text/css"
rel="stylesheet">
<asp:table id="tblComment" Width="448px" Height="16px" runat="server"></asp:table>
<DIV align="left"><FONT face="宋体"></FONT> </DIV>
<FONT face="宋体"></FONT><FONT face="宋体">
<TABLE id="Table2" style="WIDTH: 448px; HEIGHT: 336px" cellSpacing="0" cellPadding="0"
width="448" border="1">
<TR>
<TD bgColor="#3399ff" colSpan="2">发表评论</TD>
</TR>
<TR>
<TD style="WIDTH: 111px; HEIGHT: 11px">
<P align="left"><FONT face="宋体">发表人</FONT></P>
</TD>
<TD style="HEIGHT: 11px">
<asp:textbox id="txtName" runat="server"></asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 111px; HEIGHT: 76px">
<DIV align="left">评论</DIV>
<DIV align="left"><FONT color="#ff0000" size="2">(500字内)</FONT></DIV>
</TD>
<TD style="HEIGHT: 76px" vAlign="top">
<DIV align="center">
<asp:textbox id="txtContent" runat="server" Height="144px" Width="349px" MaxLength="500" TextMode="MultiLine"></asp:textbox></DIV>
</TD>
</TR>
<TR>
<TD style="WIDTH: 111px; HEIGHT: 1px">选择表情</TD>
<TD style="HEIGHT: 1px">
<asp:imagebutton id="BB1" runat="server" ImageUrl="../Images/Pic_Face/BB1.gif" CommandName="BB1"></asp:imagebutton>
<asp:imagebutton id="BB2" runat="server" ImageUrl="../Images/Pic_Face/BB2.gif" CommandName="BB2"></asp:imagebutton>
<asp:imagebutton id="BB3" runat="server" ImageUrl="../Images/Pic_Face/BB3.gif" CommandName="BB3"></asp:imagebutton>
<asp:imagebutton id="BB4" runat="server" ImageUrl="../Images/Pic_Face/BB4.gif" CommandName="BB4"></asp:imagebutton>
<asp:imagebutton id="BB5" runat="server" ImageUrl="../Images/Pic_Face/BB5.gif" CommandName="BB5"></asp:imagebutton>
<asp:imagebutton id="BB6" runat="server" ImageUrl="../Images/Pic_Face/BB6.gif" CommandName="BB6"></asp:imagebutton>
<asp:imagebutton id="BB7" runat="server" ImageUrl="../Images/Pic_Face/BB7.gif" CommandName="BB7"></asp:imagebutton>
<asp:imagebutton id="BB8" runat="server" ImageUrl="../Images/Pic_Face/BB8.gif" CommandName="BB8"></asp:imagebutton>
<asp:imagebutton id="BB9" runat="server" ImageUrl="../Images/Pic_Face/BB9.gif" CommandName="BB9"></asp:imagebutton>
<asp:imagebutton id="BB10" runat="server" ImageUrl="../Images/Pic_Face/BB10.gif" CommandName="BB10"></asp:imagebutton>
<asp:imagebutton id="BB11" runat="server" ImageUrl="../Images/Pic_Face/BB11.gif" CommandName="BB11"></asp:imagebutton>
<asp:imagebutton id="BB12" runat="server" ImageUrl="../Images/Pic_Face/BB12.gif" CommandName="BB12"></asp:imagebutton>
<asp:imagebutton id="BB13" runat="server" ImageUrl="../Images/Pic_Face/BB13.gif" CommandName="BB13"></asp:imagebutton>
<asp:imagebutton id="BB14" runat="server" ImageUrl="../Images/Pic_Face/BB14.gif" CommandName="BB14"></asp:imagebutton>
<asp:imagebutton id="BB15" runat="server" ImageUrl="../Images/Pic_Face/BB15.gif" CommandName="BB15"></asp:imagebutton>
<asp:imagebutton id="BB16" runat="server" ImageUrl="../Images/Pic_Face/BB16.gif" CommandName="BB16"></asp:imagebutton>
<asp:imagebutton id="BB17" runat="server" ImageUrl="../Images/Pic_Face/BB17.gif" CommandName="BB17"></asp:imagebutton>
<asp:imagebutton id="BB18" runat="server" ImageUrl="../Images/Pic_Face/BB18.gif" CommandName="BB18"></asp:imagebutton>
<asp:imagebutton id="BB19" runat="server" ImageUrl="../Images/Pic_Face/BB19.gif" CommandName="BB19"></asp:imagebutton>
<asp:imagebutton id="BB20" runat="server" ImageUrl="../Images/Pic_Face/BB20.gif" CommandName="BB20"></asp:imagebutton>
<asp:imagebutton id="BB21" runat="server" ImageUrl="../Images/Pic_Face/BB21.gif" CommandName="BB21"></asp:imagebutton>
<asp:imagebutton id="BB22" runat="server" ImageUrl="../Images/Pic_Face/BB22.gif" CommandName="BB22"></asp:imagebutton>
<asp:imagebutton id="BB23" runat="server" ImageUrl="../Images/Pic_Face/BB23.gif" CommandName="BB23"></asp:imagebutton>
<asp:imagebutton id="BB24" runat="server" ImageUrl="../Images/Pic_Face/BB24.gif" CommandName="BB24"></asp:imagebutton>
<asp:imagebutton id="BB25" runat="server" ImageUrl="../Images/Pic_Face/BB25.gif" CommandName="BB25"></asp:imagebutton>
<asp:imagebutton id="BB26" runat="server" ImageUrl="../Images/Pic_Face/BB26.gif" CommandName="BB26"></asp:imagebutton>
<asp:imagebutton id="BB27" runat="server" ImageUrl="../Images/Pic_Face/BB27.gif" CommandName="BB27"></asp:imagebutton>
<asp:imagebutton id="BB28" runat="server" ImageUrl="../Images/Pic_Face/BB28.gif" CommandName="BB28"></asp:imagebutton>
<asp:imagebutton id="BB29" runat="server" ImageUrl="../Images/Pic_Face/BB29.gif" CommandName="BB29"></asp:imagebutton>
<asp:imagebutton id="BB30" runat="server" ImageUrl="../Images/Pic_Face/BB30.gif" CommandName="BB30"></asp:imagebutton>
<asp:imagebutton id="BB31" runat="server" ImageUrl="../Images/Pic_Face/BB31.gif" CommandName="BB31"></asp:imagebutton></TD>
</TR>
<TR>
<TD style="WIDTH: 111px; HEIGHT: 1px"></TD>
<TD style="HEIGHT: 1px">
<asp:button id="btnAdd" runat="server" Width="64px" Text="发表"></asp:button>
<asp:label id="lblIPAddress" runat="server" Visible="False"></asp:label>
<asp:label id="lblArticleID" runat="server" Visible="False"></asp:label></TD>
</TR>
<TR>
<TD bgColor="#3399ff" colSpan="2"><FONT face="宋体"><FONT color="red" size="-1">注:所有评论通过审核后才会被公开。</FONT></FONT></TD>
</TR>
</TABLE>
</FONT>

lizhizhe2000 2006-10-31
  • 打赏
  • 举报
回复
没有代码,怎么帮你呢?
liujia_0421 2006-10-31
  • 打赏
  • 举报
回复
支持一下吧...
学习...
发帖
.NET社区

6.1w+

社区成员

.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
帖子事件
创建了帖子
2006-10-31 08:43
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。