Adding a field to Register.aspx & Details.aspx

Topics: Help
Dec 21, 2007 at 7:55 PM
Ok I followed the directions on adding fields to the Membership pages from the tutorial here:
Here is the error I recieved and have no clue what I am doing wrong - Please help.

Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30057: Too many arguments to 'Public Shared Sub Insert(varAddress As String, varPhone As String, varFirstname As String, varLastname As String, varAvatar() As Byte, varMemberid As System.Guid, varNewsletter As System.Nullable(Of Boolean))'.

Source Error:


Line 31: Membership.CreateUser(username.Text, password.Text, email.Text, question.Text, answer.Text, True, System.Web.Security.MembershipCreateStatus.Success)
Line 32: Dim user As MembershipUser = Membership.GetUser(username.Text)
Line 33: MemberInfo.Insert(Addr.Text, Phone.Text, fname.Text, lname.Text, Nothing, CType(user.ProviderUserKey, Guid), NewsletterCheck.Checked, Addr2.Text, city.Text, state.Text, zip.Text, country.Text, ci.Text)
Line 34: Membership.UpdateUser(user)
Line 35: If ClubStarterKit.Web.UserAdministration.NeedsEmailVerification() = True Then

Source File: d:\hshome\naturalgolf\moenormangolfacademy.info\member\Register.aspx Line: 33



Show Detailed Compiler Output:

c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppCode.2ifoemv4.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Web.Extensions\1.0.61025.0_31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\89e84e06\19d73ea27242c801\SubSonic.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\Appglobal.asax.w2ytmhsw.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Web.Mobile\2.0.0.0_b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Design\2.0.0.0_b03f5f7f11d50a3a\System.Design.dll" /R:"C:\WINDOWS\assembly\GAC32\System.Data\2.0.0.0_b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Runtime.Serialization\3.0.0.0_b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System\2.0.0.0_b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\fb4fd14b\87306fac7242c801\UrlRewritingNet.UrlRewriter.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\3154bbf5\a1aaed917242c801\FredCK.FCKeditorV2.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\928d4939\4e6147937242c801\Microsoft.Practices.EnterpriseLibrary.Common.DLL" /R:"C:\WINDOWS\assembly\GAC32\System.Web\2.0.0.0_b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC32\System.Data.OracleClient\2.0.0.0_b77a5c561934e089\System.Data.OracleClient.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebgboswrrb.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\e988eebd\020e608a7242c801\AJAXExtensionsToolbox.DLL" /R:"C:\WINDOWS\assembly\GACMSIL\System.IdentityModel\3.0.0.0_b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebq-zd7ola.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\9651241c\6bfe62847242c801\AjaxControlToolkit.DLL" /R:"C:\WINDOWS\assembly\GACMSIL\System.Management\2.0.0.0_b03f5f7f11d50a3a\System.Management.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Web.Extensions.Design\1.0.61025.0_31bf3856ad364e35\System.Web.Extensions.Design.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\7cdb1c79\2b7ef18a7242c801\EventCalendar.DLL" /R:"C:\WINDOWS\assembly\GAC32\System.EnterpriseServices\2.0.0.0_b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\ef17884d\159159947242c801\Microsoft.Practices.EnterpriseLibrary.Data.DLL" /R:"C:\WINDOWS\assembly\GAC32\System.Transactions\2.0.0.0_b77a5c561934e089\System.Transactions.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.ServiceModel\3.0.0.0_b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Configuration.Install\2.0.0.0_b03f5f7f11d50a3a\System.Configuration.Install.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\a8271c18\37aec99c7242c801\MySql.Data.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\9b1afc92\99d721957242c801\Microsoft.Practices.ObjectBuilder.DLL" /R:"C:\WINDOWS\assembly\GACMSIL\System.Web.Services\2.0.0.0_b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Drawing\2.0.0.0_b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\274a3f7b\d6d6cd9a7242c801\Microsoft.Web.Preview.DLL" /R:"C:\WINDOWS\assembly\GACMSIL\System.Configuration\2.0.0.0_b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Messaging\2.0.0.0_b03f5f7f11d50a3a\System.Messaging.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Xml\2.0.0.0_b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\assembly\dl3\a2e1e627\a593709d7242c801\Subkismet.DLL" /R:"C:\WINDOWS\assembly\GACMSIL\System.Windows.Forms\2.0.0.0_b77a5c561934e089\System.Windows.Forms.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.dll" /D:DEBUG=1 /debug+ /win32resource:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\zngsdoc4.res" /define:MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.0.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.1.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.2.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.3.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.4.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWebzngsdoc4.5.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2a13cde0\d59d4cc1\AppWeb_zngsdoc4.6.vb"


Microsoft (R) Visual Basic Compiler version 8.0.50727.832
for Microsoft (R) .NET Framework version 2.0.50727.832
Copyright (c) Microsoft Corporation. All rights reserved.

d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(52) : error BC30456: 'address2' is not a member of 'ClubStarterKit.Data.MemberInfo.Columns'.

qry.AddUpdateSetting(MemberInfo.Columns.address2, Addr2.Text)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(53) : error BC30456: 'city' is not a member of 'ClubStarterKit.Data.MemberInfo.Columns'.

qry.AddUpdateSetting(MemberInfo.Columns.city, city.Text)
~~~~~~~~~~~~~~~~~~~~~~~
d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(54) : error BC30456: 'state' is not a member of 'ClubStarterKit.Data.MemberInfo.Columns'.

qry.AddUpdateSetting(MemberInfo.Columns.state, state.Text)
~~~~~~~~~~~~~~~~~~~~~~~~
d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(55) : error BC30456: 'zip' is not a member of 'ClubStarterKit.Data.MemberInfo.Columns'.

qry.AddUpdateSetting(MemberInfo.Columns.zip, zip.Text)
~~~~~~~~~~~~~~~~~~~~~~
d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(56) : error BC30456: 'country' is not a member of 'ClubStarterKit.Data.MemberInfo.Columns'.

qry.AddUpdateSetting(MemberInfo.Columns.country, country.Text)
~~~~~~~~~~~~~~~~~~~~~~~~~~
d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(57) : error BC30456: 'ci' is not a member of 'ClubStarterKit.Data.MemberInfo.Columns'.

qry.AddUpdateSetting(MemberInfo.Columns.ci, ci.Text)
~~~~~~~~~~~~~~~~~~~~~
d:\hshome\naturalgolf\moenormangolfacademy.info\member\Details.aspx(62) : error BC30451: Name 'address2' is not declared.

MemberInfo.Insert(Addr.Text, Phone.Text, fname.Text, lname.Text, Nothing, user.ProviderUserKey(), NewsletterCheck.Checked, address2.text, city.text, state.text, state.text, zip.text, country.text, ci.text)
Coordinator
Dec 22, 2007 at 1:25 AM
'Public Shared Sub Insert(varAddress As String, varPhone As String, varFirstname As String, varLastname As String, varAvatar() As Byte, varMemberid As System.Guid, varNewsletter As System.Nullable(Of Boolean))'
MemberInfo.Insert(Addr.Text, Phone.Text, fname.Text, lname.Text, Nothing, CType(user.ProviderUserKey, Guid), NewsletterCheck.Checked, Addr2.Text, city.Text, state.Text, zip.Text, country.Text, ci.Text)

Looks like you don't need the following in the MembershipInfo.Inse... line: Addr2.Text, city.Text, state.Text, zip.Text, country.Text, ci.Text

So now you should change the code to look like this:

MemberInfo.Insert(Addr.Text, Phone.Text, fname.Text, lname.Text, Nothing, CType(user.ProviderUserKey, Guid), NewsletterCheck.Checked


HOPE THIS HELPS!
Dec 22, 2007 at 3:48 PM
Right I know that is what is giving the error, but those are the new fields I am trying to add to the details and register page, I need these fields -
I followed the instructions on the site on how to add new fields but it has not worked. So I am not sure what I am missing to get the new fields to work and update to the database properly.