Establish a standard routine that uses the. Net 2.0 Membership Feature (iii)--bind access Chapter

Source: Internet
Author: User
Tags bind

After the example in the previous chapter we have set up a standard, there are many interesting (even some professional-grade) features of the landing system.

But how do we manage this system? Do we have to manage our life with the ASP.net management tools m$ offers?

--Of course not! That's terrible! t_t

--we have to write a background, one can modify the background according to user rights! @_@

Of course there is a kind of database madman, they only coldly glanced at the database structure provided by m$, lightly deciphered all the mysteries of them, conveniently dragged 5-6 grid to write more than 10 lines of SQL in the database method. For such a master, we admire, we can not wait to absorb his hundred years of skill, and then kill quickly, NND.

But being such a master requires a lot of experience and finesse. We little rookie, not to write round eyes, nor saints, the so-called "see through" skills in our body can not work. We only have membership standard object profile and Roles standard object.

Wouldn't it be convenient to access these objects through binding?

Accessing more complex objects through a page--in the era of the. NET 1.x--was a torment for us. Obviously a lot of objects have data row characteristics, why not direct access? So many people---including me, tried various methods. I was a loser of 5555, and a lot of people have succeeded in working out some very effective methods. But the situation did not last long--since the release of ODS from. NET 2.0, the shadow of my failure will never come back.

1 The general idea of binding membership with ODS

As shown in the figure

Strategically we view each user as a row, and the GetAllUsers () in membership as a SELECT statement.

But a standard System.Web.Security.MembershipUser does not have the attributes of a data-bound object

such as primary key/read-only information so we can rewrite it to add these features to it

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.