Customizing/Editing Windows Form authentication design

Donald Symmons 2,856 Reputation points
2022-11-22T23:17:05.583+00:00

If I use windows form authentication for new user sign up and login, can I create my own design on these forms without necessarily using the pre-designed web page?
Because it seems like forms authentication comes with a pre-designed template.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,246 questions
{count} votes

Accepted answer
  1. Lan Huang-MSFT 25,386 Reputation points Microsoft Vendor
    2022-11-23T09:51:37.717+00:00

    Hi @Donald Symmons ,
    Of course, you can design it by yourself.
    You can check the following two tutorials, both of which are about Windows Form authentication,
    but the pages are different. You can design according to your own needs.
    https://learn.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-security/introduction/an-overview-of-forms-authentication-cs#creating-the-login-pages-user-interface
    https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/aspnet/development/forms-based-authentication#create-a-logonaspx-page
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. AgaveJoe 26,186 Reputation points
    2022-11-23T01:49:24.84+00:00

    If I use windows form authentication for new user sign up and login, can I create my own design on these forms without necessarily using the pre-designed web page?

    Of course. Why do you think otherwise? Please read the documentation I provided in your previous post which contains a basic login form you can format however you like.

    FormsAuthentication Class

    Because it seems like forms authentication comes with a pre-designed template.

    Web Forms comes with controls that work with ASP.NET Forms Authentication but there is not rule that you have to use the controls.

    0 comments No comments

  2. Albert Kallal 4,646 Reputation points
    2022-11-23T02:36:58.53+00:00

    You can certainly design your own logon page.

    In fact, when you drag + drop the "logon" control into a form?

    Then you have this option:

    263272-image.png

    the "convert" to template is a VERY good option, since then it "converts" the control you dragged onto the form as full markup.

    At this point, then you are free to modify, and use markup as you please. And it even separates out all of the events for that control.

    So it "still" keeps all of the logon events intact for your use.

    Thus these:

    263273-image.png

    So, it then since the control now shows full markup behind - and is thus able to be customized to any way you want.

    You don't have to use the logon control, and you could learn + wire up the events and code on your own. But, with above "convert to template", then the control spits out all of the markup for that control. Thus, allowing near un-limited customizing and yet the "events" for the control are still available.

    So, at that point it quite much your own paint canvas, and I used it to create this:

    263291-image.png

    So, you can roll your own, you don't have to use the logon control. But it certainly far better to use the built in one, and the option to "convert" to template means you have 100% customizing of the markup as required.

    Regards,
    Albert D. Kallal (Access MVP 2003-2017)
    Edmonton, Alberta, Canada

    0 comments No comments