Quantcast
Channel: ASP.NET Core
Browsing all 9386 articles
Browse latest View live

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 Article


Persisting 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 Article


Image may be NSFW.
Clik here to view.

Error 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 Article

How 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 Article

Better 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 Article


Applying 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 Article

Image may be NSFW.
Clik here to view.

How 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 Article

Antivirus 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 Article


can 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 Article


How 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 Article

Getting 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 Article

How 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 Article

ASP.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 Article


Phone 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 Article

CRUD 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 Article


Web 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 Article

How 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 Article


Learning Repository Pattern

Broken it somehow and I don't fully understand this yet. public void ConfigureServices(IServiceCollection services) { services.AddDbContext<AppDbContextFactory>(options =>...

View Article

How 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 Article

Can 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
Browsing all 9386 articles
Browse latest View live