473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using profile in a Class

Im accessing my profile in a Class using:

Dim P As ProfileBase = HttpContext.Current.Profile
Dim myInt As Integer = P.GetPropertyValue("myProfileId")

All is working fine, however how do I use the
profile.myProfile.items.clear() method in a Class?

Any thoughts?

Thanks James

Nov 2 '07 #1
1 867
Forgot to mention - MyProfile values come from a custom class for the storage
of list items (values from a checkBoxlist).

This seems to work:

Dim P As ProfileBase = HttpContext.Current.Profile
Dim myVariable As ProfileCommon = P
myVariable.MyProfile.items.Clear()

Can anyone comment???

"James Page" wrote:
Im accessing my profile in a Class using:

Dim P As ProfileBase = HttpContext.Current.Profile
Dim myInt As Integer = P.GetPropertyValue("myProfileId")

All is working fine, however how do I use the
profile.myProfile.items.clear() method in a Class?

Any thoughts?

Thanks James
Nov 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rodusa | last post by:
I am trying to replace cookies with the new "Asp.net 2.0 profiles" in my shopping cart application, but I am having trouble to access profile properties using HttpContext.Current.Profile. I can...
3
by: Thief_ | last post by:
I have the following data in a web page: <tr height="25"> <td nowrap class="odd" align="center"><img src="/forums/images/icon_topic_new.gif" width=14 height=14 alt='New Topic' border=0></td> ...
0
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
4
by: Marco Assandri | last post by:
Hi everybody, I have a problem with this code. 'An anonymous username copied from the Username column of Aspnet_Users table with IsAnonymous = True dim SurelyAnonymousUsername =...
1
by: shapper | last post by:
Hello, I have a profile with multiple profile properties in my Web.Config: <add allowAnonymous="false" name="Contact" type="Contact" serializeAs="Binary"/> <add allowAnonymous="false"...
1
by: shapper | last post by:
Hello, I have the following class to be used in profile: <Serializable()_ Public Class Options Inherits ProfileBase Private _Newsletter As Boolean Public Property Newsletter() As Boolean
9
by: Kirk | last post by:
I have successfully, implemented a custom Membership Provider to a SQL 2000 table, however, I am having problems doing the same with a Profile Provider. As I understand it, the steps for both of...
0
by: Nano | last post by:
Hi, In an assembly I have created a class like this: <Serializable()_ Public Class Profile : Inherits System.Web.Profile.ProfileBase 'some private vars and public properties
3
by: Oriane | last post by:
Hi there, I would like to open my Asp.Net project as a "Web Application" rather than as a "Web Site" in Visual Studio. But the thing is that I use the System.Web.Profile and the auto-generated...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.