O
Oriane
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
class "ProfileCommon myApp.Profile", which provides me with type profile
properties. And the fact is that this generated class is not generated with
Web app...
For ex, in the web site project, if "X" is a profile Property, I can write:
using System.Web.Profile;
....
Profile.X = "nnnn";
However I could use some code like this in the web application project:
Membership.ApplicationName = "myApp";
ProfileBase userpf = ProfileBase.Create(userName); // the current
user name
// Value ot the "X" profile property
string valeur = userpf.GetPropertyValue("X").ToString();
The thing is that I don't have the current user name, although I could save
in a hidden field for instance after the user has logged in the login page
(this is of course a form authentication app).
In that case, will it work ?
Is there anything more straightforward to convert my VStudio web site
project in a VStudio web app project ?
Regards
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
class "ProfileCommon myApp.Profile", which provides me with type profile
properties. And the fact is that this generated class is not generated with
Web app...
For ex, in the web site project, if "X" is a profile Property, I can write:
using System.Web.Profile;
....
Profile.X = "nnnn";
However I could use some code like this in the web application project:
Membership.ApplicationName = "myApp";
ProfileBase userpf = ProfileBase.Create(userName); // the current
user name
// Value ot the "X" profile property
string valeur = userpf.GetPropertyValue("X").ToString();
The thing is that I don't have the current user name, although I could save
in a hidden field for instance after the user has logged in the login page
(this is of course a form authentication app).
In that case, will it work ?
Is there anything more straightforward to convert my VStudio web site
project in a VStudio web app project ?
Regards