SectionControls/Guestbook.ascx.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//===============================================================================================
//
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
//
//===============================================================================================
using System;
using System.Text;
using System.Data;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using MyWebPagesStarterKit.Controls;
using MyWebPagesStarterKit;
using System.IO;
using System.Web;
public partial class SectionControls_Guestbook : SectionControlBaseClass
{
private Guestbook _section;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Session["EntryMade"] = null;
Session["antibotimage"] = generateRandomString(4).ToUpper();
EnsureID();
valAntiBotImage.ValidationGroup = ID;
valAntiBotImageRequired.ValidationGroup = ID;
valAuthorRequired.ValidationGroup = ID;
valTextRequired.ValidationGroup = ID;
btnNewEntry.ValidationGroup = ID;
}
}
protected void Page_PreRender(object sender, EventArgs e)
{
updateViews();
if (RssCapable(this._section.GetType()) && _section.GuestbookEntries.Rows.Count > 0)
{
WebPage page = new WebPage(Request.QueryString["pg"]);
this.DisplayRssButton(page);
//adding link in html-head for rss detection in the browswer
HtmlLink link = this.MetaLink(page);
this.Page.Header.Controls.Add(link);
}
}
protected void gvGuestbookEdit_RowCommand(object source, GridViewCommandEventArgs e)
{
switch (e.CommandName)
{
case "entry_delete":
后面还有 107 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
