Commerce Server General - error when trying to use the UserProfileEditControl

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > April 2004 > error when trying to use the UserProfileEditControl





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author error when trying to use the UserProfileEditControl
Jason

2004-04-11, 4:27 pm

Hello. I was hoping somebody could help me with a Commerce Server problem.
I am trying to make use of the "UserProfile.ascx" control that comes with
the MSIB21 site (uses the UserProfileEditControl class). I dragged this
control onto a new web form within the MSIB21 project and tried to run the
web form in a browser. I am getting the following error: " Item has already
been added. Key in dictionary: 'GeneralInfo' Key being added: 'GeneralInfo'
". Now, the MSIB site does have a property called "GeneralInfo" in the User
profile object. But, I fail to understand why I am getting this error for a
brand new instantiation of the control on a new page? Can anybody help me
with this? Thank you.


Tomas Vera

2004-04-14, 3:33 pm

Are you running any code in the Page_Load (or other funciton) for this control?

I've seen this happen where I included a control on my page, then called the
control's public function ("ReloadControl()" ) to load values into the control
from the containers' Page_Load event. After this, the control's own Page_Load
ran and tried to re-load the control, giving the exception you are getting.

The answer was to call ReloadControl() in the Page_PreRender function to allow
the container to load the control, modify some data, and then re-draw the
control in the PreRender handler.

This may not be your issue, but that's what was holding me up.

Hope this helps,

-tomas





On Thu, 8 Apr 2004 16:05:49 -0400, "Jason" <jason.garrett@brulant.com> wrote:

>Hello. I was hoping somebody could help me with a Commerce Server problem.
>I am trying to make use of the "UserProfile.ascx" control that comes with
>the MSIB21 site (uses the UserProfileEditControl class). I dragged this
>control onto a new web form within the MSIB21 project and tried to run the
>web form in a browser. I am getting the following error: " Item has already
>been added. Key in dictionary: 'GeneralInfo' Key being added: 'GeneralInfo'
>". Now, the MSIB site does have a property called "GeneralInfo" in the User
>profile object. But, I fail to understand why I am getting this error for a
>brand new instantiation of the control on a new page? Can anybody help me
>with this? Thank you.
>


Jason

2004-04-18, 10:52 am

I don't think this is the problem. I do have code in the Page_Load event
and this is where I am getting the error. However, the debugger only goes
through this event once and I get the error the first time through.
Furthermore, I removed the "AddToShowList" entry that was adding the
"GeneralInfo" key to the UserProfileEditControl. Even after removing that,
I still get the error. Do you have any other ideas? Thanks.

"Tomas Vera" <tavera@NOxSPAMsbcglobal.net> wrote in message
news:o9pq70516l8ebpboohvhe53hbi7vne0f7m@
4ax.com...
> Are you running any code in the Page_Load (or other funciton) for this

control?
>
> I've seen this happen where I included a control on my page, then called

the
> control's public function ("ReloadControl()" ) to load values into the

control
> from the containers' Page_Load event. After this, the control's own

Page_Load
> ran and tried to re-load the control, giving the exception you are

getting.
>
> The answer was to call ReloadControl() in the Page_PreRender function to

allow
> the container to load the control, modify some data, and then re-draw the
> control in the PreRender handler.
>
> This may not be your issue, but that's what was holding me up.
>
> Hope this helps,
>
> -tomas
>
>
>
>
>
> On Thu, 8 Apr 2004 16:05:49 -0400, "Jason" <jason.garrett@brulant.com>

wrote:
>
problem.[vbcol=seagreen]
the[vbcol=seagreen]
already[vbcol=seagreen]
'GeneralInfo'[vbcol=seagreen]
User[vbcol=seagreen]
for a[vbcol=seagreen]
me[vbcol=seagreen]
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com