1.bin添加引用ChineseConverter.dll
2. 添加using Microsoft.International.Converters.TraditionalChineseToSimplifiedConverter;
string strTest = "繁體字";
Response.Write(string.Format("繁体输出:{0}<br/>", ChineseConverter.Convert(strTest, ChineseConversionDirection.SimplifiedToTraditional)));
Response.Write(string.Format("简体输出:{0}<br/>", ChineseConverter.Convert(strTest, ChineseConversionDirection.TraditionalToSimplified))); ......
原地址:http://blogs.msdn.com/giorgio/archive/2009/02/01/asp-net-menu-and-ie8-rendering-white-issue.aspx
ASP.NET Menu and IE8 rendering white issue
If you are using the ASP.NET Menu control, you might encounter under certain circumstances an issue where the menu appears as a white box in IE8 Standards Mode.
What IE8 is doing IS correct (by design), in the sense that in Standards mode IE8 is following the standards. Specifically, (element).currentStyle.zIndex returns "auto" in Standards mode when zindex has not been set. The ASP.NET Menu control assumes a different value.
I’d like to suggest a few possible workarounds to solve quickly the issue (note, you can use either one of them, depending on your scenario):
Overriding the z-index property
Using CSS Friendly Control Adapters
Adding the IE7 META tag to the website
1 – Overriding the z-index property
You can manually set the z-index property of the Menu items using the DynamicMenuStyle property of the asp:Menu ......
MainPage文件:WebForm1.aspx
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestMasterPage.WebForm1" enableViewState="False"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder></form>
</body>
</HTML>
WebForm1.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System. ......
在Asp.Net提供了三种常用的验证方式:Windows方式是和IIS结合起来可以实现基本、摘要、集成 Windows等身份验证;Passport方式是使用Windows Live ID的帐户来进行统一验证的;Forms方式是使用常见的表单来实现验证。
一、普通实现方式
这种方式是最简单的,只需要配置一下就可以了。
1、执行aspnet_regsql命令建立数据库
aspnet_regsql命令在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727目录下,按提示运行就可以了
2、新建一个web网站
在Web.Config中加入配置:
<connectionStrings>
<add name="MySqlConnection" connectionString="Data Source=dbserver;Initial Catalog=database;user id=userid;password=****;" />
</connectionStrings>
<system.web>
& ......
MultiView 和 View Web 服务器控件用作其他控件和标记的容器,并提供了一种可方便地显示信息的替换视图的方式。
一、方案
可以使用 MultiView 和 View 控件执行如下任务:
·根据用户选择或其他条件提供备选控件集。例如,您可能允许用户从一个源 (feed) 列表中选择,其中每个源都在独立的 View 控件中配置。然后可以显示包含用户选择的源的 View 控件。可以使用 MultiView 和 View 控件作为创建多个 Panel 控件的一种替代方法。
·创建多页窗体。MultiView 和 View 控件可以提供与 Wizard 控件相似的行为。Wizard 控件尤其适合于创建用户分步骤填写的窗体。Wizard 控件还支持更多内置 UI 元素(如页眉和页脚)、“上一页”和“下一页”按钮以及模板。如果要创建根据条件(而不是按顺序)更改的显示,或者不需要 Wizard 控件支持的额外功能,则可以使用 MultiView 控件来代替 Wizard。
二、背景
MultiView 控件用作一个或多个 View 控件的外部容器。View 控件又可包含标记和控件的任何组合。
MultiView 控件一次显示一个 View 控件,并公开该 View 控件内的标记和控件。通过设置 Mu ......
四、MultiView 类
MultiView 控件是一组 View 控件的容器。使用它可定义一组 View 控件,其中每个 View 控件都包含子控件。然后,应用程序可根据用户标识、用户首选项以及在查询字符串参数中传递的信息等条件,向客户端呈现特定的 View 控件。也可以使用 MultiView 控件创建向导。这种情况下,MultiView 控件包含的每个 View 控件都表示向导中的不同步骤或页。此控件还可用来开发移动设备的多屏幕应用程序。此控件提供的功能与 .NET Framework 1.1 版的 ASP.NET Form 移动控件相同。
在 MultiView 控件中,一次只能将一个 View 控件定义为活动视图。如果某个 View 控件定义为活动视图,它所包含的子控件则会呈现到客户端。可以使用 ActiveViewIndex 属性或 SetActiveView 方法定义活动视图。如果 ActiveViewIndex 属性为空,则 MultiView 控件不向客户端呈现任何内容。如果活动视图设置为 MultiView 控件中不存在的 View,则会在运行时引发 ArgumentOutOfRangeException。
可以通过声明方式或编程方式定义活动视图。如果在定义 MultiView 控件时以声明方式设置 ActiveViewIndex 属性,则会使设置为活动视图的 View 控件在首次调用 MultiV ......