2

我想编写 javascript 以保存到不是 web.config 中指定的默认提供程序的配置文件提供程序:

<profile defaultProvider="SqlProfileProvider">
 <providers>
  <clear />
  <add name="SQLiteProfileProvider" applicationName="Gallery Server Pro" connectionStringName="SQLiteDbConnection" type="GalleryServerPro.Data.SQLite.SQLiteProfileProvider" />
  <add name="SqlProfileProvider" applicationName="Gallery Server Pro" connectionStringName="SqlServerDbConnection" type="System.Web.Profile.SqlProfileProvider" />
 </providers>
 <properties>
  <add name="ShowMediaObjectMetadata" defaultValue="false" type="String" allowAnonymous="true" />
  <add name="UserAlbumId" defaultValue="0" type="Int32" allowAnonymous="false" />
  <add name="EnableUserAlbum" defaultValue="true" type="String" allowAnonymous="false" />
 </properties>
</profile>

我可以使用此 javascript 保存到默认提供程序:

Sys.Services.ProfileService.properties["ShowMediaObjectMetadata"] = "true";
Sys.Services.ProfileService.save(null, null, null, null);

但是如何保存到名为 SQLiteProfileProvider 的提供程序?

谢谢,罗杰·马丁

图库服务器专业版

4

0 回答 0