Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Dynamically generating images for OAuth

$
0
0

hi guys

I want to create 

  1. Images for my OAuth 
  2. make them clickable

here is my code,

I am using pro as a variable to concatenate the images of the OAuth providers

thanks 

Ehi

  @foreach (var provider in loginProviders)
        {
            var pro = "~/images/icons/" + @provider.Name;
            pro = pro + ".gif";<button type="submit" class="btn btn-default" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.Name</button><img img src=@pro />

What I get in return is https://localhost:44335/Accounts/~/images/icons/Facebook.gif

What I expect is https://localhost:44335/images/icons/Facebook.gif 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>