floweregg.aspx.cs
来自「如果不使用IIS,请先运行 XSP.exe,待提示已侦听 8080端口后」· CS 代码 · 共 46 行
CS
46 行
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DNNLite.DesktopModules.Comment;
using System.Web.Configuration;
using NHibernate.Expression;
public partial class DesktopModules_Comment_FlowerEgg : System.Web.UI.Page
{
private int commentid;
protected void Page_Load(object sender, EventArgs e)
{
//if (string.IsNullOrEmpty(Request["id"]))
//{
// return;
//}
commentid = int.Parse( Request["id"]);
Comment c= Comment.Find(commentid);
//string json = string.Format( "{{\"backers\":{0},\"antis\":{1}}}" ,c.Backers,c.Antis );
//Response.Write(json);
if (Request["stand"] == "flower")
{
c.Backers += 1;
Response.Write(c.Backers);
}
if (Request["stand"] == "egg")
{
c.Antis += 1;
Response.Write(c.Antis);
}
c.Update();
Response.End();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?