易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : asp.net

Asp.Net 2.0的Profile

在Membership表中可以存储一些用户的基本信息,但有的时候,我们需要记录的用户信息远远不止Membership表中提供的这些,如QQ、MSN、家庭住址、联系电话等等。那如何把这些用户信息记录到数据库中呢?在asp.net2.0中为我们提供了个性设置的功能――Profile。下面看一下Profile的几个特征:
1) Profile根据每个用户存储各自的用户资料,包括匿名称用的资料。
2) Profile可以在Web.Config中定义而立即生效,不必手动扩充数据库字段。
3) Profile可以存储任意数据类型,包括简单数据类型和自定义的复杂数据类型。
那Profile是如何实现上面这些功能呢?
Asp.net2.0中为每一个登录用户验证其身份,对匿名请求用户生成一个GUID,这是一个唯一标识用户身份的代号,这样对于每一个请求的用户都无可遁形,并且各自的身份标识都互不干扰。那asp.net如何实现在不扩充字段的基础上,随意地扩充用户其它信息呢?大家打开SqlServer2005数据库中的aspnet_profile表会看到其中有两个字段PropertyNames和PropertyValuesString。PropertyValuesString字段中存的是你新增用户资料的所有信息,它是以文本流的形式存储的,而PropertyNames字段中描述如何解析PropertyValuesString字段的内容,它 ......

asp.net连接sql用的SqlHelper

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Data.SqlClient;
namespace DAL
{
    /// <summary>
    /// 数据库的通用访问代码
    /// 此类为抽象类,不允许实例化,在应用时直接调用即可
    /// </summary>
    public class SqlHelper
    {
        //获取数据库连接字符串,其属于静态变量且只读,项目中所有文档可以直接使用,但不能修改
        public static readonly string Getcon = ConfigurationManager.ConnectionStrings["con"].ConnectionString;
        // 哈希表用来存储缓存的参数信息,哈希表可以存储任意类型的参数。
        private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
        /// <summary>
 &n ......

asp.net连接sql用的SqlHelper

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Data.SqlClient;
namespace DAL
{
    /// <summary>
    /// 数据库的通用访问代码
    /// 此类为抽象类,不允许实例化,在应用时直接调用即可
    /// </summary>
    public class SqlHelper
    {
        //获取数据库连接字符串,其属于静态变量且只读,项目中所有文档可以直接使用,但不能修改
        public static readonly string Getcon = ConfigurationManager.ConnectionStrings["con"].ConnectionString;
        // 哈希表用来存储缓存的参数信息,哈希表可以存储任意类型的参数。
        private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
        /// <summary>
 &n ......

ASP.NET Web Developer Checklist




The following is a simple checklist you can use when building web
applications.  Much of this still applies to other technologies and can
easily be extended.  I try not to get too specific on technology or
methodology, but it is definitely leaning toward ASP.NET.
If you
can think of something I am missing or disagree, please leave a
comment.  Detailed information follows the checklist.
How much
of the checklist you follow will depend on the project.  If its just a
hobby site, you may skip items like load testing, but as the site grows
you will likely need to check off more and more items.  Some items, like
separation of logic should just be done from the start.  In any case,
you should make an actual decision to ignore the item.  This is much
better than just forgetting to do it.
The Check List
Everywhere
Use source control.
Be consistent with naming
conventions.
Create documentation.
Backup
everything.
Us ......

asp.net生成数字、字母随机数

 char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
                StringBuilder ascii = new StringBuilder();
               // byte[] bytes = new byte[100];
                Random random = new Random();
               
              //  int code;
               // strin ......

ASP.NET MVC 入门1、简介

什么是MVC模式
MVC(Model-View-Controller,模型—视图—控制器模式)用于表示一种软件架构模式。它把软件系统分为三个基本部分:模型(Model),视图(View)和控制器(Controller)。
那么MVC模式和我们熟悉的WebForm模式有什么不同呢?他的各个部分又是怎样分工的呢?
我们先来看一下普通的WebForm模式下,我们请求一个例如http://www.51mvc.com/blog/index.aspx的URL,那么我们的WebForm程序会到网站根目录下去寻找blog目录下的index.aspx文件,然后由index.aspx页面的CodeBehind文件(.CS文件)进行逻辑处理,其中或许也包括到数据库去取出数据(其中的经过怎样的BLL到DAL这里就不谈了),然后再由index.aspx页面来呈现给用户。简单的示意图如下所示:

也就是一个URL请求的是在服务器与该URL对应路径上的物理文件(ASPX文件或其他),然后由该文件来处理这个请求并返回结果给客户端。
但是,对于MVC模式,这是怎样的一个过程呢?
我们先来建一个ASP.NET MVC的项目吧。VS2008默认是没有ASP.NET MVC的项目模板的,首先我们需要到http://www.microsoft.com/downloads/details.aspx?FamilyId=A24D1E00-CD35-4F66-BAA0-2362BDDE0766&displaylang=en去下载最 ......

asp.net生成静态页面

ASP.NET生成静态页
核心技术:
HTMLPage文件夹,ModelHTML.htm文件中的ArticleTitle,ArticleContent都是要替换的区域
WriteFile(dr["ArticleTitle"].ToString(), dr["ArticleContent"].ToString(), dr["ID"].ToString());
1.前台
<head runat="server">
<title>ASP.NET生成静态网页</title>
</head>
<body style="text-align: center" mce_style="text-align: center">
<form id="form1" runat="server">
<div style="text-align: center" mce_style="text-align: center">
<table style="width: 601px" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" style="height: 85px; text-align: center;"><strong>ASP.NET生成静态网页</strong></td>
</tr>
<tr>
<td colspan="3" rowspan="2" style="vertical-align: top; height: 67px; text-align: center">
<asp:DataList ID="DataList1" runat="server" BackColor="White" Border ......
总记录数:2672; 总页数:446; 每页6 条; 首页 上一页 [172] [173] [174] [175] 176 [177] [178] [179] [180] [181]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号