Hi,
Based on my understanding, you want to save the page state into the database. If I have misunderstood you, please feel free to tell me, thanks.
As I know, if we want to save page state or any page setting modified by users, we can create ASP.NET memebership database first using the ASP.NET Configuration Tool. Then it will save the page state into the ASPNETDB.mdf file by default.
To customize a database for webparts run the utility named as aspnet_regsql.exe. It is present in the \Windows\Framework\v2.0.50727 subdirectory. This utility helps us to create tables and stored procedures required to customize database. On more thing which we need to do is to customize our web.config file.
<connectionStrings>
<clear />
<add name="LocalSqlServer" connectionString="data source=(local);database=DatabaseName;User Id=UserName;Pwd=Password;"
</connectionStrings>
<system.web>
<compilation debug="true"/>
<authentication mode="Forms"/>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
applicationName="/CustomConnections" />
</providers>
</membership>
<profile enabled="true" defaultProvider="TableProfileProvider">
<providers>
<clear />
<add name="TableProfileProvider"
type="Microsoft.Samples.SqlTableProfileProvider"
connectionStringName="LocalSqlServer"
table="aspnet_Profile"
applicationName="/CustomConnections" />
</providers>
</profile>
</system.web>
To customize that we need to override these settings in our application's web.config file.
1, define a connectionString.
2, "LocalSqlServer" is the name of connection string.
3, "ApplicationName" is any name which can mention for identification of our application.
By the way, here are some links below may help you to get more infomation about the issue.
Walkthrough: Implementing Web Parts Personalization using IPersonalizable
http://msdn.microsoft.com/en-us/library/ms366720.aspx
ConnectionString Property
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(VS.80).aspx
Hope it helps.
I'm always ready for your reply.
Thank you for thinking of ASP.NET Forums,
Jerry Weng - MSFT
If the post helps you, please click the Mark As Answer or the Mark As Not Answer if not.