Bin/Default.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace XmlVote
{
//该源码下载自www.51aspx.com(51aspx.com)
//由51aspx.com搜集整理
public partial class _Default : System.Web.UI.Page
{
protected XmlNodeList xnl;
protected string VoteTitle = "";
protected System.Web.UI.WebControls.Button Button1;
private XmlDocument myDoc = new XmlDocument();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
BindXML("1");
}
private void BindXML(string VoteID)
{
myDoc.Load(Server.MapPath("DB_51aspx.xml"));
XmlNode xn = myDoc.SelectSingleNode("//VoteInfo[ID='" + VoteID + "']");
VoteTitle = xn.SelectSingleNode("VoteTitle").InnerText;
xnl = xn.SelectNodes("Item");
}
protected void Vote_Click(object sender, EventArgs e)
{
string VoteID = "1";
//通过Cookie记录投票
if(Request.Cookies["IsVote"]!=null)
{
Response.Write("<script>alert('对不起,你已投过票!');document.location=document.location;</script>");
}
else
{
if(Request.Form["Vote"] != null && Request.Form["Vote"] != "")
{
string[] votes = Request.Form["Vote"].Split(',');
myDoc.Load(Server.MapPath("DB_51aspx.xml"));
XmlNode xn = myDoc.SelectSingleNode("//VoteInfo[ID='" + VoteID + "']");
for(int i=0;i<votes.Length-1;i++)
{
XmlNode xn0 = xn.SelectSingleNode("Item[VoteID='" + votes[i] + "']");
后面还有 16 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。