ASP.NET读写cookies
/// <summary>
/// 写Cookies
/// </summary>
/// <param name="response"></param>
/// <param name="request"></param>
/// <param name="server"></param>
/// <param name="IndexValue"></param>
/// <param name="TextValue"></param>
/// <param name="ExpriesHour">设置的过期时间</param>
public void WriteCookies(HttpResponse response,HttpRequest request,HttpServerUtility server,string IndexValue,string TextValue,int ExpriesHour)
{
response.Cookies[IndexValue].Value = TextValue;
response.Cookies[IndexValue].Expires = System.DateTime.Now.AddHours(ExpriesHour);
}
/**//// <summary>
/// 读Cookies
/// </summary>
/// <param name="response"></param>
/// <param name="request"></param>
/// <param name="server"></param>
/// <param name="IndexValue"></param>
/// <returns></returns>
public string ReadCookies(HttpResponse response, HttpRequest request, HttpServerUtility server, string IndexValue)
{
if (request.Cookies[IndexValue] !=&nb
相关文档:
fileupload控件的用法
ASPX页面
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" t ......
using System.Security.Cryptography;
using System.IO;
using System.text;
/// <summary>
/// 加密
/// </summary>
/// <param name="str"> ......
前前后后收到过一些学生的来信,询问ASP.NET的学习顺序问题,在此就向打算系统学习ASP.NET技术的初学者谈谈我的建议。
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET。
我强烈反对在没系统学过一门面向对象(OO) ......
C# ASP.NET里@的妙用
ASP.NET C# string 字符串的前面可以加 @ 可以将转义字符(\)当作普通字符对待。
比如:string str = @"C:\Windows";
如果我们不用 @ 的话,应该是:string str = "C:\\Windows";
@ 字符串中,我们用两个连续英文双引号表示一个英文双引号,如下字符串的实际内容为:="=,字符串长度为 3 ......
在ASP.NET项目开发中,会被要求添加广告,有翻屏效果、有广告轮流显示、飘浮广告、左侧广告、右侧广告等。用本贴持续记录一些收集的广告效果。希望给有需求的朋友们一些支持。也希望朋友们把我未记录的广告形式也给予一起回贴。使本贴更加的完善,也让更多的朋友们分享。
1.翻屏效果
翻屏效果
<html>
<head>& ......