MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Custom MonoX Profile (Closed) (Mono Support )

Viewed 22965 time(s), 13 post(s) 6/19/2012 11:57:21 AMby mdaly
mdaly

mdaly

12/3/2012 9:44:41 PM
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
Rated 5.00, 1 vote(s). 
93 Reputation 8 Total posts
mdaly

mdaly

6/19/2012 11:57:22 AM
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
This content has not been rated yet. 
93 Reputation 8 Total posts
khorvat

khorvat

6/19/2012 1:19:28 PM
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
Rated 5.00, 1 vote(s). 
15993 Reputation 2214 Total posts
mdaly

mdaly

6/19/2012 1:25:32 PM
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

This content has not been rated yet. 
93 Reputation 8 Total posts
mzilic

mzilic

6/19/2012 3:36:12 PM
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
Rated 5.00, 2 vote(s). 
2218 Reputation 300 Total posts
mdaly

mdaly

6/19/2012 10:58:08 PM
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
This content has not been rated yet. 
93 Reputation 8 Total posts
hazballae

hazballae

11/27/2012 3:22:32 PM
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
This content has not been rated yet. 
34 Reputation 5 Total posts
mzilic

mzilic

11/27/2012 3:51:54 PM
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
Rated 4.00, 1 vote(s). 
2218 Reputation 300 Total posts
hazballae

hazballae

11/27/2012 4:43:25 PM
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

This content has not been rated yet. 
34 Reputation 5 Total posts
mzilic

mzilic

11/27/2012 5:01:28 PM
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
Rated 5.00, 1 vote(s). 
2218 Reputation 300 Total posts
1 2