Well, right now, I'm hung up on the databind in the subform. I'm just not sure how to handle it. I had a subform that I was using for extended attributes, but I'm not sure how to modify it for all of these new attributes. Here is what I'm at so far:
using
{
}
Can anyone throw out a little more info on what needs to be done to the database. What if i wanted to use seperate tables?
peace shakes
Carolina Pulse
The following is a bit confusing to me. When you say that it's optional, does that mean that you can skip it completely?
"The next step is really optional depending on how you layout your data. My extended cs_UserProfile table contains ID’s that are foreign key references into other tables in my system. In my case I have an in memory cache that map these ID’s to friendly names. You could add another join to the “cs_vw_User_FullUser” view to get your friendly names from your own data if you so choose. Since I have this data in memory already, I updated the code in the file “Controls\User\UserProfileData.cs” in the method “GetPropertyValue”, to lookup the data for these ID’s from my in memory cache. This “GetPropertyValue” method is called from the Chameleon controls which I will use later in this post to show these new values on the UI. You’ll see references to “ProactiveLogic.WebFacade” which is an external project that manages my cached data. My new code is noted by the “new code” comments."
Hey northland did you ever get this figured out...i have done everything but the "this is optional part" and creating my own subform...im guessing the subform is a manditory addition...in my instance i just have some bool values that i need to pass using check boxes...i am hung up on how to set this up
Done so far
Added this to CommonDataProvider.cs
// Carolina Pulse Restaurant Style user.RestaurantsPizza = Convert.ToBoolean(dr["RestaurantsPizza"]);
Added this to SqlCommonDataProvider.cs
//Carolina Pulse Restaurant Style myCommand.Parameters.Add("@RestaurantsPizza", SqlDbType.SmallInt).Value = upm.CurrentUser.RestaurantsPizza;
Added this to user.cs
bool restaurantsPizza = false; #endregion public bool RestaurantsPizza { get { return restaurantsPizza; } set { restaurantsPizza = value; } }
Added a check box to the edituser.aspx
<asp:CheckBox ID="RestaurantsPizza" runat="server" />
Added a userdata control to the profile
<CSControl:UserProfileData runat="server" Property="RestaurantsPizza"> <ContentTemplate> <CSControl:ThemeImage runat="server" AlternateText="Pizza" ImageUrl="~/images/custom/icons/resturanttype/pizza.png" /> </ContentTemplate> </CSControl:UserProfileData>
I also added all the database bits in there as well...but that is about as far as i have gotten....at this point clicking save does not update any values in the database and userprofiledata control displays the image no mater what....so im guessing that the subform is my missing link and i started a new project for it....my question to you is what is the proper way to go about this what calls and references do i need? This is what i have done so far...
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using CommunityServer.Controls;using CommunityServer.Components;namespace CarolinaPulseControls{ public class PulseExtendedUserData : WrappedSubFormBase { // storage for the reference to the extended user data private CheckBox RestaurantsPizza; // this property will be used to allow the theme // developer to provide the ID of the CheckBox containing Restaurant Style public bool RestaurantsPizza { get { return (bool)(ViewState["RestaurantsPizza"] ?? "" } set { ViewState["RestaurantsPizza"] = value; } } }
....any help would be great...
No. I haven't been able to get this done. I decided just wait a bit and move on to something else. Got tired of banging my head against the wall. You've gotten as far as I have.
darn...well if i get it to work ill post my findings...
Guys, I switched to DNN. No regret at all. I'm just sorry for trashing my time with CS. All what you've been trying to achieve here during last 3 month could be done in DNN just with $30 for a module and about 15 minutes of configuration work w/o even a line of code. We can endlessly discuss which product is better, at the same time banging our heads against the wall. Having experience with both products, I know now, which is better for me.
dnn is nice, and i'm currently building a site using dnn, but it doesn't have member rewards points. That's a big chunk of time in development if I wanted do it myself.
Hey Shakes, thought you may be interested in this thread:
http://communityserver.org/forums/t/497398.aspx
thanks for the nod northland...im glad to see that the cs folks have their ears to the ground...
Kilm…I took a look a dnn a year ago and decided against if for some reason…I cant now recall why but I did…perhaps I will give it a second look…to be fair though I have not spent 3 months trying to get this one aspect accomplished…combined it has probably been less than a day…its just that I know so little about coding in C#/asp.net that simple tasks become daunting without a guide…that’s ok though I like a challenge…