Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7183395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:58:14+00:00 2026-05-28T17:58:14+00:00

I’m working on an MVC webapp and am done with the registration module that

  • 0

I’m working on an MVC webapp and am done with the registration module that uses the SQL Membership tables.

Now, I have written code that, when a user gets created and is approved, the application sends an email to the user with an activation link in email.

Now I want to create an admin page where admin can approve those registered users

How can I do this?

code:

public ActionResult Register(RegisterModel model)
{
    if (ModelState.IsValid)
    {
        // Attempt to register the user
        MembershipCreateStatus createStatus = MembershipService.CreateUser(model.UserName, model.Password, model.Email);

        if (createStatus == MembershipCreateStatus.Success)
        {
            // FormsService.SignIn(model.UserName, false /* createPersistentCookie */);

            //used profiler  -- add profile information
            var profile = Profile.GetProfile(model.UserName);
            profile.FirstName = model.FirstName;
            profile.LastName = model.LastName;
            profile.Save();

            //email confirmation code
            MembershipService.SendConfirmationEmail(model.UserName);
            return RedirectToAction("Confirmation");
        }
        else
        {
            ModelState.AddModelError("", AccountValidation.ErrorCodeToString(createStatus));
        }
    }

    // If we got this far, something failed, redisplay form
    ViewData["PasswordLength"] = MembershipService.MinPasswordLength;
    return View(model);
}

//send confirmation code
public void SendConfirmationEmail(string userName)
{
    MembershipUser user = Membership.GetUser(userName);
    string confirmationGuid = user.ProviderUserKey.ToString();
    string verifyUrl = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) +
                     "/account/verify?ID=" + confirmationGuid;

    var message = new MailMessage("contacts@abc.com", user.Email)
    {
        Subject = "Please confirm your email",
        Body = verifyUrl

    };

    var client = new SmtpClient();

    client.Send(message);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:58:15+00:00Added an answer on May 28, 2026 at 5:58 pm

    You want to look into configuring an Area for your site.

    From the link:

    To accommodate large projects, ASP.NET MVC lets you partition Web
    applications into smaller units that are referred to as areas. Areas
    provide a way to separate a large MVC Web application into smaller
    functional groupings. An area is effectively an MVC structure inside
    an application. An application could contain several MVC structures
    (areas).

    For example, a single large e-commerce application might be divided
    into areas that represent the storefront, product reviews, user
    account administration, and the purchasing system. Each area
    represents a separate function of the overall application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.