473,399 Members | 3,603 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,399 software developers and data experts.

simple profile question

Am i missing somthing simple?
I can't access any of the profile names in my code behind i.e;

textBox1.text = Profile.test = "some text"

here's the web.config:
<?xml version="1.0"?>

<configuration>

<appSettings/>
<connectionStrings/>

<system.web>
<compilation debug="true" strict="false" explicit="true" />
<pages>
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.WebControls.WebParts" />
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>

<authentication mode="Forms" />
<anonymousIdentification enabled="true"/>

<profile>
<properties>
<add name="test" allowAnonymous="true"/>
</properties>
</profile>

</system.web>
</configuration>

I'm using VS2005

Any ideas - its been a long day!!

Sep 8 '07 #1
4 1335
Are you using Web Application Projects? The Profile was compiled on the fly
for the Web Site Projects, but because the web application projects don't do
dynamic compilation, something different needs to be done. You'll need to
generate a strongly typed class to represent the profile. Luckily, there's
an add-in to VS to handle this for web application projects. You can get the
add-in at: http://www.codeplex.com/WebProfile
--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"James Page" <Ja*******@discussions.microsoft.comwrote in message
news:E2**********************************@microsof t.com...
Am i missing somthing simple?
I can't access any of the profile names in my code behind i.e;

textBox1.text = Profile.test = "some text"

here's the web.config:
<?xml version="1.0"?>

<configuration>

<appSettings/>
<connectionStrings/>

<system.web>
<compilation debug="true" strict="false" explicit="true" />
<pages>
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.WebControls.WebParts" />
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>

<authentication mode="Forms" />
<anonymousIdentification enabled="true"/>

<profile>
<properties>
<add name="test" allowAnonymous="true"/>
</properties>
</profile>

</system.web>
</configuration>

I'm using VS2005

Any ideas - its been a long day!!

Sep 8 '07 #2
Thanks Mark that works a treat.

Yet another Microsoft "one of those things". I wonder if they will overcome
this in VS 2008??

Regards

James
Sep 9 '07 #3
PS Do you know of any other useful add-ins for VS2005?
Sep 9 '07 #4
There's the visual studio power toys at:
http://msdn2.microsoft.com/en-us/vstudio/aa718340.aspx

There's a book called "Windows Developer Power Tools" by O'Reilly that has a
lot of awesome utilities for doing windows development as well as tools for
use with VS.

--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"James Page" <Ja*******@discussions.microsoft.comwrote in message
news:94**********************************@microsof t.com...
PS Do you know of any other useful add-ins for VS2005?

Sep 9 '07 #5

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

Similar topics

1
by: slchen | last post by:
Now, I have a question about profile. I write a program as below: file name: pro.py ------------------------------- import profile import string,re,sys,random,time import main,read_dont ...
51
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct...
1
by: VB Programmer | last post by:
I am using personalization/profile to store info for the user that is not contained in the aspnet_Users or aspnet_Membership tables. This info includes, firstname, lastname, and phonenumber. ...
5
by: cipcip | last post by:
By default profile use sql server xpress provider and probabily, caches stored data when they are requested for the first time, So the question is: why we should use profile instead of storyng,...
1
by: Max2006 | last post by:
Hi, Do I need to be worry about WS-Profiling or it already had been taken care in ASP.NET asmx web services platform? Thank you, Max
0
by: ashish | last post by:
hi all, I am working with a custom profile provider that stores my business object as profile with anonymous identification turned on. I have a question regarding how it is supposed to work...
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"...
11
by: Weston Weems | last post by:
I've got the need to have user information for logged in user in a readily avaliable page context (a lot like how Profile is) except not suck. Before we jump to any conclusions, from what I...
1
by: Rusty Hill | last post by:
My site does not allow anonymous users. After a user has logged in and been authenticated I need to access some information in their profile object. I thought I would do this in the LoggedIn...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.