摘要: #region 得到IP地址 /// <summary> /// 得到IP地址 /// 创建者:袁纯林 时间:2008-1-19 /// 修改者: 时间: /// </summary> /// <returns>IP地址</returns> public static string GetIP() { string reIp = ""; if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] == 阅读全文
posted @ 2013-03-05 20:21 战 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 代码案例:<ul class="arrlist"> <asp:Repeater ID="Rnews1" runat="server"> <ItemTemplate> <li <%# (Rnews1.Items.Count+1)%2==0?"class=\"lir\"":"" %>><a href="<%#Eval("LinkURL")%>"> <i 阅读全文
posted @ 2013-02-27 08:55 战 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 首先,当然是下载URLRewriter了 download.microsoft.com/download/0/4/6/0463611e-a3f9-490d-a08c-877a83b797cf/MSDNURLRewriting.msi 下载安装后再bin目录下找到URLRewriter.dll文件 然后把这个文件引用到项目中,下面开始配置 1 在web.config文件中加入如下代码<configuration><configSections><sectionname="RewriterConfig"type="URLRewriter. 阅读全文
posted @ 2012-03-15 18:05 战 阅读(159) 评论(1) 推荐(0) 编辑
摘要: 一、认识Web.config文件Web.config文件是一个XML文本文件,它用来储存 ASP.NET Web 应用程序的配置信息(如最常用的设置ASP.NET Web 应用程序的身份验证方式),它可以出现在应用程序的每一个目录中。当你通过VB.NET新建一个Web应用程序后,默认情况下会在根目录自动创建一个默认的 Web.config文件,包括默认的配置设置,所有的子目录都继承它的配置设置。如果你想修改子目录的配置设置,你可以在该子目录下新建一个Web.config文件。它可以提供除从父目录继承的配置信息以外的配置信息,也可以重写或修改父目录中定义的设置。在运行时对Web.config文件 阅读全文
posted @ 2012-03-13 23:34 战 阅读(100) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Configuration;using System.Data;using BookShop.Models;namespace BookShop.DAL{ class DBHeler:IDisposable { private string connectionString; //配置文件的连接字符串语句 private bool isConnecte 阅读全文
posted @ 2011-08-21 12:59 战 阅读(182) 评论(0) 推荐(0) 编辑