首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >评论框与facebook相同,但在asp.net中

评论框与facebook相同,但在asp.net中
EN

Stack Overflow用户
提问于 2013-04-05 16:26:41
回答 2查看 1.3K关注 0票数 0

我已经创建了一个web应用程序,并且我已经创建了一个页面,用于显示与Facebook相同的帖子,但我的评论框在asp.net中不起作用。

代码语言:javascript
运行
复制
[WebMethod]
public static string LoadImages( int Skip, int Take ) {
    // string image;
    System.Threading.Thread.Sleep( 2000 );
    StringBuilder GetImages = new StringBuilder();
    // string Imagespath = HttpContext.Current.Server.MapPath("~/networking/image/");
    // string SitePath = HttpContext.Current.Server.MapPath("~/networking");
    //var Files = (from file in Directory.GetFiles(Imagespath) select new { image = file.Replace(SitePath, "") }).Skip(Skip).Take(Take);
    int records = 0;
    var Files = ProductDataManager.GetRequiredPost( 1, 100, ref records ).Skip( Skip ).Take( Take );


    foreach( var file in Files ) {
        string postimage = null;
        if( file.PostImage != "" ) {
            postimage = file.PostImage.Replace( "\\", "/" ).Substring( 13 );
        }
        string image = null;
        if( file.PostImage != "" ) {
            image = file.ImageUrl.Replace( "\\", "/" ).Substring( 13 );
        }
        GetImages.AppendFormat( String.Format( @"                 
                            <div style='clear: both;'>
                                <div style='float: left;'>
                                    <img src='{0}' id='userimage1' height='50' width='50' runat='server'/>
                                </div>
                                <div style='float: left; margin-left: 8px; font-family: Arial; font-size: 14px; font-weight: bold;
                                    color: Navy;'>
                                    <span id='ctl00_ContentPlaceHolder1_gdvgrid_ctl06_username1'>{1}</span>
                                </div>
                                <div style='float: right;'>

                                </div>
                            </div>
                            <div style='margin-left: 70px; clear: both;'>
                                <div style='clear: both; color: Black; font-family: Arial; width: 400px;'>
                                    <span id='txtsub1' style='display:inline-block;width:400px;font-family: Arial; font-size: 15px; color: #64635d;'>{2}</span>
                                </div>
                                <div style='clear: both; font-family: Arial;'>
                                    <img src='{3}' width='400'/>
                                </div>
                                <div style='color: Black; width: 400px; text-align: justify'>
                                    <span style='font-family: Arial;
                                        font-size: 12px; color: #64635d; text-align: justify; line-height: 15px;'>{4}</span>
                                </div>

        <div style='float: left; margin-top: 10px; margin-right: 10px;'>
                <a onclick='$find(&#39;SendMail3&#39;).show();return false;' id='ctl00_ContentPlaceHolder1_gdvgrid_ctl{6}_btnsendenq' href='href='javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$gdvgrid$ctl{7}$btnsendenq&#39;,&#39;&#39;)' style='font-size: 12px; color: #6d84b4;' tabindex='-1'>Send Enquiry</a>
        </div>
        <div style='float: left; margin-top: 10px; margin-right: 10px;'>
            <a onclick='$find(&#39;Commentdialog&#39;).show();return false;' id='ctl00_ContentPlaceHolder1_gdvgrid_ctl{8}_btnsendenq' href='javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$gdvgrid$ctl{9}$lnkcomment&#39;,&#39;&#39;)' style='font-size: 12px; color: #6d84b4;' tabindex='-1'>Comment</a>
                                </div>
<div style='display: none'>
            <input type='submit' name='ctl00$ContentPlaceHolder1$gdvgrid$ctl{10}$btncomment' value='Comment' id='ctl00_ContentPlaceHolder1_gdvgrid_ctl{11}_btncomment' style='width:100px;'>

</div>

<div style='clear: both; color: #c0c0c0; font-size: 12px; padding-top: 10px; font-weight: bold;'>
                                    <span id='ctl00_ContentPlaceHolder1_gdvgrid_ctl06_lbldate'>{5}</span>
                                </div>
                            </div>

                            <div style='border-bottom: 2px solid gray; padding-bottom: 10px;'>
                            </div>

                            ", image, file.CompanyIdentity, file.PostTitle, postimage, file.PostDescription, file.CreateDate, file.Userid, file.Userid, file.ScrapID, file.ScrapID, file.ScrapID, file.ScrapID ) );
    }
    return GetImages.ToString();
}
EN

回答 2

Stack Overflow用户

发布于 2013-04-05 16:34:37

Facebook Comments Box:Comments Box是一个社交插件,可以让用户在你的网站上发表评论。功能包括调节工具和分发。

票数 0
EN

Stack Overflow用户

发布于 2013-06-01 18:45:31

你可以使用来显示评论,使用asp.net来存储评论。->> comment ->>在->>数据库表中插入数据将数据绑定到asp.net中继器。如何使用asp转发器:http://www.w3schools.com/aspnet/aspnet_repeater.asp对于facebook风格,使用css。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15829194

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档