Background: I work with ASPX files and webforms (as my day job) but have never really worked with Razor (.cshtml).
I am trying to create a website that logs into Steam using Owin.Security.Providers
.
When i do Install-Package Install-Package Owin.Security.Providers
and implement the API from https://steamcommunity.com/dev/apikey, I noticed that the corresponding button is implemented in Razor as shown below.
using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {
@Html.AntiForgeryToken()
<div id="socialLoginList">
<p>
@foreach (AuthenticationDescription p in loginProviders) {
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
}
</p>
</div>
Questions:
Is there a way to get the same function above in an ASPX page instead of in a CSHTML page?
Is it the following code that gives the button the link for the login?
using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {