asp.net(c#) 制作注册码程序
1、定义CS类 using System;
using System.Data;
using System.Configuration;
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.Web.Configuration;
using Hasher;
/**//// <summary>
/// cs 的摘要说明
/// </summary>
///
namespace cs
...{
public class cs
...{
//判断序列号
public bool css()
//m为配置文件值
//x为序列号值
//css进行比较该注册码是否正确
...{
Hasher.Hasher hash = new Hasher.Hasher();
string xulie = hash.Sern();
string m = ConfigurationManager.AppSettings.Get("message").ToString();
if (m == xulie)
...{
return true;
}
else
...{
return false;
}
&
相关文档:
为了忘记:
1,System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32);:void
//从IIS来的请求
2,System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest) : Void
//在这一步创建一个HttpContext对象
3, System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext) : IHttpHandler
// ......
//一:用自己的服务器作为邮件服务器时:
//如出现:邮箱不可用。 服务器响应为: 5.7.1 Unable to relay for ***@gmail.com
//解决办法如下:在IIS中,右击“默认SMTP虚拟服务器”,选择“属性”,切换到“访问”页,点击“中继”按钮,在弹出框中选择“仅以下列表除外&rdq ......
项目中有一些报表,本身速度就不太快,遇到数据量大的情况,更是让人抓狂,用户也提出了报表速度慢的问题,于是想着如何实现报表的数据依赖缓存,即将报表数据缓存,当数据发生改变时,再重新获取数据。
最简单的方法,是在显示报表的aspx页面第一行加上形如<%@ OutputCache Duration="600" VaryByParam="some_par ......
方法1:
Response.Cookies["username"].Value="gjy";
Response.Cookies["username"].Expires=DateTime.Now.AddDays(1);
方法2:
System.Web.HttpCookie newcookie=new HttpCookie("username");
newcookie.Value="gjy";
newcookie.Expires=DateTime.Now.AddDays(1);
Response.AppendCookie(newcookie);
创建带 ......
看了asp.net 的回调技术后不是很理解。还是把写的东西贴下,自己以后学习时候多看看。前台index.aspx页<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace = "System.Text" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transit ......