Mono Support Custom MonoX Profile (Closed)

Viewed 37493 time(s), 13 post(s), 6/19/2012 11:57:21 AM - by mdaly
12/3/2012 9:44:41 PM
93 Reputation 8 Total posts

Hi,

I am creating a custom profile field and have applied the code you have provided in the attachment to monox4.7. When I look into the code I don't understand how the system knows where to store and retrieve the additional profile field. I guess there is more code I need to add to the system but I am unsure how to go about doing this.

what I am looking for is some guidance of how I would actually go about achieving this - or some help regarding the steps I need to take when wanting to customise the user profile.

Mike

1
6/19/2012 11:57:22 AM
93 Reputation 8 Total posts

Hi,

I have installed the custom monox sample site and everything is working correctly.

However, I am at the stage where I will be writing code to select, insert and update my custom fields in a custom database table.

I am wondering if anyone has done this and what is the best way to structure the code etc?

If anyone can provide sample code it would be great and really help.

Thanks in advance

Regards

Mike

2
6/19/2012 1:19:28 PM
15993 Reputation 2214 Total posts

Let me explain this shortly and someone from the support team will provide you with the source sample.

In the mentioned code block (the one that you have sent to my e-mail) you can but the data access code you prefer. So if you are working with the ADO.NET, Entity Framework etc. you just go ahead and use that. If you are extending existing MonoX infrastructure only then you are required to use the LLBLGen ORM to extend or manipulate the data access. 

Let me know if we should send you a code sample because we will send the one related to LLBLGen Pro and I'm not sure if that the thing you need ?

Regards

3
6/19/2012 1:25:32 PM
93 Reputation 8 Total posts

Hi Khorvat,

thank you for the quick response.

I would like to use the same approach that the existing MonoX infrastructure is built on - so would it be possible to send a code sample please?

By looking through this I can expand my knowledge of the system which will make it more manageable when extending to my requirements.

Thanks again,

Regards

4
6/19/2012 3:36:12 PM
2218 Reputation 300 Total posts

Hello,

I'm attaching a sample which extends EditProfile.ascx control with a custom profile field. I'm also attaching a sample repository for you.

Of course using this approach requires you to inherit the:
-UserProfile.aspx page
-UserProfileModule.ascx
-UserProfile.ascx

Regards

5
6/19/2012 10:58:08 PM
93 Reputation 8 Total posts

Hi Mzilic,

Thank you for providing this sample!

It is really helpful and provides everything I need in order to extend the user profile to meet my requirements.

This product is really great and being able to customize it makes it even better :)

Mike

6
11/27/2012 3:22:32 PM
34 Reputation 5 Total posts

Hi Mzilic,

seems that the sample not work with MonoX 4.5.

EditProfile.aspx.cs raise a NullReferenceException, base.OnInit(e) event.

Any idea to how can i resolve this.

Thank you,
Elvis

7
11/27/2012 3:51:54 PM
2218 Reputation 300 Total posts

Hello,

Can you tell me the exact MonoX version number you are using?

The sample markup is probably missing some controls found in the base MonoX control(s) this can either be EditProfile, UserProfile or UserProfileModule.

Regards,
Mario

8
11/27/2012 4:43:25 PM
34 Reputation 5 Total posts

Hi Mario,
the exact version of our MonoX is v4.5.3206.40 with DB v4.5.3103.

I tested my code with Monox v4.1.xx and after i update my code to work with v4.5.xx but in this version throw the error i descripted above.

I attach my code for more clarity.

Thank you very much
Elvis

9
11/27/2012 5:01:28 PM
2218 Reputation 300 Total posts

Hello,

Your inherited EditProfile control is missing the timezone related controls in your markup:

<dd id="rowTimeZone" runat="server">
     <asp:Label ID="lblTimeZone" AssociatedControlID="ddlTimeZone" runat="server" CssClass="label-bold"></asp:Label>               
     <strong><asp:Label ID="prevTimeZone" runat="server"></asp:Label></strong>
     <monox:TimeZonePicker id="ddlTimeZone" runat="server"></monox:TimeZonePicker>
 </dd>
Regards,
Mario

10
1 2
This is a demo site for MonoX. Please visit Mono Software for more info.