⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 locations.aspx.cs

📁 classfinalcs.rar .net 压缩包解压时不能有密码。
💻 CS
字号:
using System;
using System.Web.UI.WebControls;

using AspNet.StarterKits.Classifieds.BusinessLogicLayer;
using AspNet.StarterKits.Classifieds.Web;

public partial class Locations_aspx : System.Web.UI.Page
{
	protected void RemoveLocationButton_Click(object sender, EventArgs e)
	{
		if (this.LocationsListBox.SelectedIndex != -1)
		{
			int locationId = Convert.ToInt32(LocationsListBox.SelectedValue);
			LocationsDB.RemoveLocation(locationId);
			LocationCache.ClearAll(Context);
			LocationsListBox.DataBind();
		}
	}
	protected void AddLocationButton_Click(object sender, EventArgs e)
	{
		if (Page.IsValid)
		{
			string location = Server.HtmlEncode(this.NewLocationTextBox.Text);
			LocationsDB.InsertLocation(location);
			LocationCache.ClearAll(Context);
			LocationsListBox.DataBind();
			NewLocationTextBox.Text = String.Empty;
		}
	}




}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -