我個人感覺這幾個控制項還不錯,但是不能滿足大的項目,昨天弄了一下,隨便托進去,利用ASPNETDB資料庫,簡直太容易了,代碼都不用寫。
Web.Config配置如下:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
<add key="maojiguo" value="yes" />
</appSettings>
<connectionStrings>
<add name="MYDBConn" connectionString="server=(local);trusted_connection=false;user id=sa;pwd=;database=cigem" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="server=(local);trusted_connection=false;user id=sa;pwd=;database=cigem" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<customErrors defaultRedirect="" />
<authorization>
<allow roles="管理員" />
</authorization>
<roleManager enabled="true" />
<membership defaultProvider="LocalSqlServer">
<providers>
<add connectionStringName="LocalSqlServer" name="LocalSqlServer"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>