question

Donald-0878 avatar image
0 Votes"
Donald-0878 asked AlbertKallal-4360 edited

Customizing/Editing Windows Form authentication design

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.

dotnet-aspnet-generaldotnet-aspnet-webpages
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What do you mean by "my own design"? Do you want to develop your own authentication system without using the FormsAuthenticationModule? Or just want to modify pages such as login,aspx?

0 Votes 0 ·
LanHuang-MSFT avatar image
0 Votes"
LanHuang-MSFT answered

Hi @Donald-0878,
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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AgaveJoe avatar image
0 Votes"
AgaveJoe answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlbertKallal-4360 avatar image
0 Votes"
AlbertKallal-4360 answered AlbertKallal-4360 edited

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



image.png (85.0 KiB)
image.png (27.2 KiB)
image.png (106.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.