c# asp.net 字符串加密解密的类
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//Cryptography密码术
namespace DAL
{
public class Encry
{
public Encry() { }
#region AES加密
public static string Encrypt(string toEncrypt)
{
byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);
RijndaelManaged rDel = new RijndaelManaged();//using System.Security.Cryptography;
rDel.Key = keyArray;
rDel.Mode = CipherMode.ECB;//using System.Security.Cryptography;
rDel.Padding = PaddingMode.PKCS7;//using System.Security.Cryptography;
ICryptoTransform cTransform = rDel.CreateEncryptor();//using System.Security.Cryptography;
&nbs
相关文档:
通常javascript代码可以与HTML标签一起直接放在前端页面中,但如果JS代码多的话一方面不利于维护,另一方面也对搜索引擎不友好,因
为页面因此而变得臃肿;所以一般有良好开发习惯的程序员都会把javascript代码放到独立的js文件中,其他页面通过引入该js文件来使用相应的
javascript代码。
今天在做一个小新闻系统的管理 ......
1 using System;
2 using System.Collections.Generic;
3 using System.Collections.Specialized;
4 using System.Linq;
5 using System.Web;
6 using System.Text;
7 u ......
1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1.Att ......
asp.net发布网站时三个选项的问题
发布网站的时候有三个选项:
第一个选项指定发布后是不是可以修改aspx文件,如果勾选,则发布后的网站行为基本与ASP.NET 1.1一致,只要没有增删修改控件,可以直接在服务器上修改aspx文件不用重新发布网站。
第二个选项指定是不是将每个aspx文件都编 ......
一,如果直接把asp.net mvc2 RC 部署在iis5.1上,会出现无法显示页面的情况,原因可能是路径映射没有起作用。
解决办法:
1.在 routes.MapRoute(
"Default", ......