samplekeyprovider.cs

来自「ajax是未来之星」· CS 代码 · 共 40 行

CS
40
字号
// *******************************************************************************************
//
// Ajax.NET Professional - The free AJAX implementation for the Microsoft.NET Framework
//
// Copyright (C) 2005 Michael Schwarz, info@schwarz-interactive.de
//
// *******************************************************************************************
using System;

namespace AjaxProSample
{
	public class SampleKeyProvider : AjaxPro.IAjaxKeyProvider
	{
		#region IAjaxKeyProvider Members

		public string Key
		{
			get
			{
				return System.Web.HttpContext.Current.Request.UserHostAddress;
			}
		}

		public string ClientScript
		{
			get
			{
				string s = "AjaxPro.key = \"" + System.Web.HttpContext.Current.Request.UserHostAddress + "\";\r\n";

				return s;
			}
		}

		#endregion

	}


}

⌨️ 快捷键说明

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