I've created a custom login control with values that are not used in
the Membership table. I created these other fields through the
<profiletag in the web config. I'm able to get a new member created
my calling membership.crea te user and get the other fields saved by
creating an instance of ProfileBase, calling
SetPropertyValu e("property",va lue) mulitple times for each property,
and finally calling the Save method. My first question is: is this the
correct approach or is there a better way of creating members and
saving the corresponding data?
Secondly, my site utilizes a master/detail scheme and when the user
logs in, I want to display their name on my master page. I created a
label on the master page and in it's Page_PreRender event, I assign the
text property the Profile.FirstNa me and Profile.LastNam e. So far, so
good. All of my detail pages inherit from a 'base' page and I have
logic in the Page_Load event to check the User.Identity.N ame and if
found, display the LoginStatus control. However, since Profile is not
available here, this explains why I placed the logic in the master
page. Is this the correct approach? Is there a better way?
Any feedback is greatly appreciated!
Thanks in advance. 2 1394
"jdp" <ja***********@ pacourts.uswrot e in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
I've created a custom login control with values that are not used in
the Membership table. I created these other fields through the
<profiletag in the web config. I'm able to get a new member created
my calling membership.crea te user and get the other fields saved by
creating an instance of ProfileBase, calling
SetPropertyValu e("property",va lue) mulitple times for each property,
and finally calling the Save method. My first question is: is this the
correct approach or is there a better way of creating members and
saving the corresponding data?
The "most correct" method would be inherit from the membership classes and
create the extra fields. Then, edit the ASPNET_ database tables with the
info you want. I am currently in the works on this same idea, but do not
have a working example. I will blog when I do: http://spaces.live.com/gregorybeamer
Otherwise, your method works, even though it requires a few more trips.
Secondly, my site utilizes a master/detail scheme and when the user
logs in, I want to display their name on my master page. I created a
label on the master page and in it's Page_PreRender event, I assign the
text property the Profile.FirstNa me and Profile.LastNam e. So far, so
good. All of my detail pages inherit from a 'base' page and I have
logic in the Page_Load event to check the User.Identity.N ame and if
found, display the LoginStatus control. However, since Profile is not
available here, this explains why I placed the logic in the master
page. Is this the correct approach? Is there a better way?
I am a bit confused on this one.
Assigning from profile is okay, but I am not sure about the login status
control. Is it not on the master page? If not, why not?
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
Thanks for the reply.
The controls are indeed on the master page. However, the User.Identity
object does not appear to be available on the masterpage when I try and
check to see if values exist. In my 'base' page, the Profile object
does not exist to get my custom fields. So now I have logic in
master_PreRende r to check the profile and logic in base.Page_Load to
check User.Identity
Secondly, my site utilizes a master/detail scheme and when the user
logs in, I want to display their name on my master page. I created a
label on the master page and in it's Page_PreRender event, I assign the
text property the Profile.FirstNa me and Profile.LastNam e. So far, so
good. All of my detail pages inherit from a 'base' page and I have
logic in the Page_Load event to check the User.Identity.N ame and if
found, display the LoginStatus control. However, since Profile is not
available here, this explains why I placed the logic in the master
page. Is this the correct approach? Is there a better way?
I am a bit confused on this one.
Assigning from profile is okay, but I am not sure about the login status
control. Is it not on the master page? If not, why not?
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: VB Programmer |
last post by:
I would appreciate your assistance on this ASP.NET 2.0 site....
This is the wierd problem: While accessing the built in .NET functions for
'profiling' or 'membership' an error is generated (see following 2
examples):
---- EXAMPLE 1 --------
OK --> Dim p As New ProfileCommon
OK --> p = Profile.GetProfile(Me.ddlRacer.SelectedItem.Text)
FAILS --> Me.lblDebug.Text = p.FirstName.ToString
|
by: Paul Keegstra |
last post by:
Hi,
I am currently working on an asp.net 2.0 web site that is a replacement of a
classic asp web site. The current web site uses a Commerce Server 2002
database for storing user information. It does not currently use any of the
Commerce Server 2002 functionality with the exception of the user
authentication features.
I have written my replacement application to use a custom login form and
custom connection string so that I can use...
|
by: Jesse Johnson |
last post by:
I have this block of code below, but when ran it only creates the member it
doesnt fill in his profile data. Is there something I am missing? Please let
me know what I can do, just trying to progamatically create a member and fill
in his profile information. Thanks in advance.
protected void btnCreateuser_Click(object sender, EventArgs e)
{
// Store username for use
string strNewUsername = tbUserName.Text;
|
by: Ned Balzer |
last post by:
Hi all,
I am pretty new to asp.net; I've done lots of classic asp, but am just
beginning to get my mind wrapped around .net.
What I'd like to do is include some code that tests if a user is logged
in, on each and every page, and redirects the user to a login page if
s/he's not logged in. The login page will also take care of some
standard setup, such as choosing/populating a user profile. I used to
use <!-- #include ... --for this,...
|
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= |
last post by:
I have been having some trouble with implementing a custom Membership
Provider. We have a custom data store and business logic that pulls user
information. I need some level of functionality above and beyond what the
prodiver currently allows. I need the ability to access a user id and the
user's permission id. With Forms authentication in 1.1, I would just create
a custom identiy and principal and store the information in the identity....
| |
by: =?Utf-8?B?QV9SZXB1YmxpY2Fu?= |
last post by:
This is a portion of my Web.config file:
<system.web>
<membership defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
applicationName="CollegeRepublicans"
|
by: Nightcrawler |
last post by:
I recently started to use MemberShip, Roles, and User to build a
portal site in asp.net 2.0. I currently have set the web.config to
only store registered users in the database. I don't want to pollute
the aspnet_Users with anonymous users.
I have two questions:
1. When a user gets to one of my aspx pages I would like to find out
if the user is logged in. I am currently doing it this way:
|
by: Magdoll |
last post by:
Hi,
I know this is potentially off-topic, but because python is the
language I'm most comfortable with and I've previously had experiences
with plone, I'd as much advice as possible on this.
I want to host a site where people can register to become a user. They
should be able to maintain their own "showroom", where they can show
blog entries (maybe just by linking to their own blogs on some other
blog/album-hosting site like Xanga), put...
|
by: Jeff |
last post by:
Hey
asp.net 2.0
at work we are about to start on a new project. Creating a website. My
mananger has created the database. The database has a table holding user
information (not that standard ASP.NET membership table). This table holds
fields like, email, private email, contact, contact email. etc...
I know that this information also can be stored in the Membership tables as
well, think the table is named ASPNET_User or ASPNET_Profile?...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |