vb.net

How to use ASP.NET Membership class to validate users in VB.NET

The Membership class provides a method for validating a membership user. If a user has entered his user name and password in a login mask, you can use the ValidateUser() method for programmatically validating the information entered by the user, as follows:

 

Protected Sub LoginAction_Click(sender As Object, e As EventArgs) Handles LoginAction.Click

If Membership.ValidateUser(UsernameText.Text, PasswordText.Text) Then

Learn more

How to use ASP.NET Membership class to retrieve users from the store in VB.NET

If you want to retrieve a single user and a list of users through the Membership class from the membership store, you can create a simple page with a GridView control for binding the users to the grid, as follows:

<html xmlns=”https://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title>Display Users Page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:GridView ID=”UsersGridView” runat=”server” DataKeyNames=”UserName” AutoGenerateColumns=”False”>
<Columns>
<asp:BoundField DataField=”UserName” HeaderText=”Username” />
<asp:BoundField DataField=”Email” HeaderText=”Email” />
<asp:BoundField DataField=”CreationDate” …

Learn more

How to use ASP.NET Membership CreateUserWizard control events in VB.NET

You can use the approach explained in the article How to use ASP.NET Membership CreateUserWizard control to create additional wizard steps. In this case you need to handle events and perform some actions within event procedures. For example if you are planning to collect additional information from the user with the wizard, you have to store …

Learn more

How to program the ASP.NET Membership Login control in VB.NET

The ASP.NET membership Login control supports several events and properties and you can use them to customize its behavior. The Login control supports the next events:

Event

Description

LoggingIn
Raised before the user gets authenticated by the control.

Authenticate

Raised to authenticate the user. If you handle this event, you have to authenticate the user on your own, …

Learn more

How to use Persistent Cookies with Forms Authentication in ASP.NET in VB.NET

Usually you will use in your projects nonpersistent authentication cookie to maintain the authentication ticket between requests. This means that if the user closes the browser, the cookie is immediately removed. The benefits are the following:

– This is a sensible step that ensures security. It’s particularly important with shared computers to prevent …

Learn more

How to use Forms Authentication custom credentials store in ASP.NET in VB.NET

The credential store in web.config (described in the articles: How to use web.config as credential store with Forms Authentication in ASP.NET and How to hash ASP.NET Forms Authentication passwords in web.config in VB.NET ) is useful for simple scenarios only.  You have not use web.config as the credential store, because:

– Potential lack of security: Even …

Learn more