Form generated by Html.BeginForm doesn't match action name given.
I have a controller like this:[HttpGet("[controller]/CreateChild/{parentId}")] [HttpGet("[controller]/ChangeChild/{childId}")] public IActionResult CreateChild(int? childId, int? parentId?) { // Only...
View ArticlePersisting a SQLConnection to cache data.
Hello: 1) I have several stored procedures that returns thousands of rows. 2) The web UI will page the data and show say 200 rows at a time. 3) On pagination, the stored procedure is getting executed...
View ArticleError When Get Result type DataTable form Web Service(ASMX)
I have problem in my web app with asmx web service when i return Data type of DataTable include column (Int) give my error and this message error (-1 is not a valid value for int64) befor is work fine...
View ArticleHow to run Sql Scripts using MigrationBuilder up
I m trying to run sql scripts using public partial class RunMySqlScripts : Migration { protected override void Up(MigrationBuilder migrationBuilder) { //var sqlFilesFolder =...
View ArticleBetter alternative for global variables
In an ASP.Net Core 1.1 Web API, I need to store some global information that must be accessible across all controllers. So when the client calls a certain endpoint on the API, a certain variable (a...
View ArticleApplying the concept of VB Module in C#
So I used to write my functions in VB module and call them from any place in the project, I don't know how to do it in C#.This is my current function in the controllerprivate readonly...
View ArticleHow to embed a real time currency converter in Excel using C#.Net
Hi, I need to create real time currency converter in Excel using C#.net like the below.Please help me to create like this. The exchange rate should always get refresh after embedding in to excel only...
View ArticleAntivirus to scan files before uploading
Hi,We have web application developed in ASP.net which has functionality to upload files.We need to scan those files before uploading on the server.Is there any Microsoft antivirus(any inbuilt antivirus...
View Articlecan i host asp.net core website on linux server?
can i host asp.net core website on linux host server?i have godaddy linux shared hosting server plan which comes with cpanel. In this case, how can i do this?
View ArticleHow to use Web Grid in asp.net core 1.0
Hi, I want to use web grid in asp.net core 1.0, please give me a solution how to use it.Regards,Prabhu
View ArticleGetting SqlException while await _context.SaveChangesAsync();
I m encrypting some sensitive data in my SQL db (i.e. SSN). I have have my encryption key saved in a table and with each encryption/Decryption request they key get called from the table. public static...
View ArticleHow to Update Model via ViewModel
Hello,I have a view that is constructed used a ViewModel. It's an attempt of an editable grid. What this view constructs is a iteration of forms for each item inside the IEnumerable of Stores, each one...
View ArticleASP.Net Core Web API Deployment to IIS Error
Hi All,I've been trying to deploy my ASP.Net Core Web API to IIS 7 but I'm having a difficult time making it work. I've been receiving 404 errors and I've tried creating a default document already. Now...
View ArticlePhone Number Validation (without Two Factor)
Hi,I am trying to validate that the user entered a valid email address and phone number. The email part is working fine. My issue is with the phone part.This is what I am doing:1. The user register and...
View ArticleCRUD Operation in .net core 1.1 using angular 2
Hi,I want a sample application which uses .net core 1.1 and angular 2 for crud operation .The application should have a grid which should have all the features to add , edit and delete records.Thanks...
View ArticleWeb API vs MVC in Ajax based projects
This question grows from an old question here where I was asking about having one view that performs read/write and update. is it better for me to start with web API where I can perform these operation...
View ArticleHow should I free my threads in async action method with async db calls?
for examplepublic async Task<string> MyAction(var parameter) { if (condition) { await DbHelper.AddItem(parameter); //Dapper async query } else if (otherCondition) { await...
View ArticleLearning Repository Pattern
Broken it somehow and I don't fully understand this yet. public void ConfigureServices(IServiceCollection services) { services.AddDbContext<AppDbContextFactory>(options =>...
View ArticleHow to run Sql Scripts using MigrationBuilder up
I m trying to run sql scripts using public partial class RunMySqlScripts : Migration { protected override void Up(MigrationBuilder migrationBuilder) { //var sqlFilesFolder =...
View ArticleCan i host asp.net core app in asp.net hosting if targeted full .net framework?
As i understand there is "old" asp.net web hosting and the newer asp.net web hosting. in order to run asp.net core app i need the newer asp.net core web hosting. the question is if i targeted the full...
View Article