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 (Zatvorena) (Mono Support )

36598 put(a) pogledan, 13 odgovor(a) 19.6.2012. 11:57:21Kreirao(la) mdaly
mdaly

mdaly

3.12.2012. 21:44:41
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
Ocjena 5,00, 1 glas(ova). 
93 Reputacija 8 Ukupno objava
mdaly

mdaly

19.6.2012. 11:57:22
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
Ovaj sadržaj još nije ocijenjen. 
93 Reputacija 8 Ukupno objava
khorvat

khorvat

19.6.2012. 13:19:28
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
Ocjena 5,00, 1 glas(ova). 
15993 Reputacija 2214 Ukupno objava
mdaly

mdaly

19.6.2012. 13:25:32
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

Ovaj sadržaj još nije ocijenjen. 
93 Reputacija 8 Ukupno objava
mzilic

mzilic

19.6.2012. 15:36:12
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
Ocjena 5,00, 2 glas(ova). 
2218 Reputacija 300 Ukupno objava
mdaly

mdaly

19.6.2012. 22:58:08
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
Ovaj sadržaj još nije ocijenjen. 
93 Reputacija 8 Ukupno objava
hazballae

hazballae

27.11.2012. 15:22:32
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
Ovaj sadržaj još nije ocijenjen. 
34 Reputacija 5 Ukupno objava
mzilic

mzilic

27.11.2012. 15:51:54
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
Ocjena 4,00, 1 glas(ova). 
2218 Reputacija 300 Ukupno objava
hazballae

hazballae

27.11.2012. 16:43:25
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

Ovaj sadržaj još nije ocijenjen. 
34 Reputacija 5 Ukupno objava
mzilic

mzilic

27.11.2012. 17:01:28
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
Ocjena 5,00, 1 glas(ova). 
2218 Reputacija 300 Ukupno objava
1 2