how to pass controller a model object from a view
hi All,I have a razor view "CDIS.cshtml" which is using a model object to render content. Now in this view, i have a submit button which calls an action method of the controller. In this action method,...
View ArticleHow to get the Route Name ?
Hello: In ASP .NET Core 1.x, I have the following: [HttpGet] [Route("GetLookupInfo"), Authorize("Bearer")] public IActionResult GetLookupInfo(string lookupName) { try { ...Inside the method, I would...
View ArticleMake ASP.NET Core MVC layout use SharePoint Master Page
I'm building a new ASP.Net Core MVC application and the customer has a SharePoint website with a branded master page. The customer wants to have the new ASP.NET Core MVC application to have the same...
View ArticleAzure csv radgrid dataset bind attempt
I am attempting to download a csv file from Azure container blob, read and load it to a dataset and then bind it to the radgrid. I can download the data and set it to a string (the sample data is...
View Articlehow to bind models from json and url-encode both in aspnet core?
how to bind models from json and url-encode both in aspnet core?
View ArticleMVC .NetCore Uploading images using IMAGESHARP and displaying in an array
hi Guys I have an upload script that uploads and saves images to a folder.PROBLEM: I want to add different colour schemes to the images and display to the user in an array or images.here is my...
View ArticleCan I make this with taghelpers
Hello, I found a wonderfull template somewhere and try to recreate the select box in dotnetcore 2.0 The html looks like this : https://gist.github.com/RoelofWobben/13f4f1dd6872819de5dddb7df16e823aCan...
View ArticleI'm getting an error when I try to migrate
Hi everybodyI got this problem trying to migrate and I don't know how to fix it, I put my contextDb on the bottom.thanks info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] User...
View ArticleNullReferenceException: Object reference not set to an instance of an object...
i am facing problems in iterating through my Deserialized json response.My JSON and classes structure are stated below. The code I am using to iterate is as follows: public class CONISRootObject {...
View ArticleStreaming large videos
Hi, i'm making an app for my home server in asp.net core. I want to make videos available on the local harddrive to be used for a client(mobile app) to stream to a chromecast.Making the app is not the...
View Articleformat model.sum as currency
Hi Folks,I am trying to format total in currency using the following code without success. @{ string.Format("{0:C}", Model.Sum(i => i.abttrpqtd)); }Can anyone help?TIAMoisés
View Article.net Core 2.0 Reflection only load of an assembly
Hello,Is there a way in .net core 2.0 to load an assembly and get its custom attributes without loading all the dependencies? I have tried the following:Assembly.ReflectionOnlyLoad - throws an...
View ArticleAuthentication with Json Web Token (JWT)
I am designing a Web API with individual user accounts, and I am trying to develop a token based authentication system. At first I planned on providing OAuth 2 bearer tokens, but I then learned that...
View ArticleWhat is the best practice of adding connecting strings in asp.net core 2?
The following comes from web.config of an old asp.net Web Forms project. How do I add this to asp.net core 2? And then how I have accessed as I did before. Since "configurationManager" no longer exists...
View Articlesmall business Website template
HiWould like to create a small business website and I am looking for some template . I want to create the site in asp.net mvc core. Just simple site with the the menu Home, Contact, Our Work ....
View ArticleHow to use services?
I'm to MVC core, I have a controller that capturers user name. // If they don't exist, create them if (person == null) { person.CreatedByName = person.FirstName + " " + person.LastName;...
View ArticleWhat is a the best practice of accessing the connecting string in...
If I have a connection string called "strConnection" in appsettings.json, how do I access it from a controller?
View ArticleWWW-Authenticate: Bearer error="invalid_token", error_description="The...
Hello: In my asp .net core (1.1), I have implemented bearer token authentication and authorization as explained in this article:https://code.msdn.microsoft.com/How-to-achieve-a-bearer-9448db57 1) The...
View ArticleApparently Random Error: "Antiforgery token validation failed. The...
Background I have a relatively new ASP.NET Core 2 site. It's running on just one server, and I only restart the site once every few days when I upload an update. About once a day, a user's request...
View Articleasp-validation-summary vs Html.ValidationSummary
HiI am complete new to asp.net core/mvc I would like to know what is the difference b.w asp-validation-summary="ModelOnly" VS @Html.ValidationSummary(false, "", new { @class = "text-danger" })what...
View Article