Click here to Skip to main content
15,891,033 members
Everything / Web Development / ASP.NET / ASP.NETvNext

ASP.NETvNext

ASP.NET5

Great Reads

by andre.lombaard
Explaining the processes involved in setting up Angular 2 within an ASP.NET 5 environment
by raddevus
Part 1: Master the ASP.NET MVC Project Template & Technologies (Razor, jQuery, JavaScript, Bootstrap, CSS). Part 2: Build an ASP.NET MVC app which runs in the browser but feels like using a desktop app.
by Gourav Jain MCTS®
This article will give a kick off start to build an application using .NET core on Linux and Windows
by Sergey Volk
Open source framework for monitoring Asp.Net Web Api 2 and MVC5 applications performance without using windows performance counters, automates performance counters data collection, store and visualization.

Latest Articles

by Ev Uklad
How to develop a Blazor server application dynamically and generate UI from Entity Framework using open-source Platz.SqlForms including master-details data entry
by Zijian
Generate strongly typed client API in C# for ASP.NET Web API and .NET Core Web API supporting desktop, Universal Windows, Android and iOS
by aditya pewekar
Create custom HTML helper to manage Page Mode like View (Readonly) and Edit/Add (Editable)
by MattiLindroth
An example on how to call Oracle stored procedures with UDTs from ASP.NET MVC / REST API

All Articles

Sort by Score

ASP.NETvNext 

13 Jun 2016 by andre.lombaard
Explaining the processes involved in setting up Angular 2 within an ASP.NET 5 environment
22 Mar 2017 by raddevus
Part 1: Master the ASP.NET MVC Project Template & Technologies (Razor, jQuery, JavaScript, Bootstrap, CSS). Part 2: Build an ASP.NET MVC app which runs in the browser but feels like using a desktop app.
21 Jul 2016 by Gourav Jain MCTS®
This article will give a kick off start to build an application using .NET core on Linux and Windows
15 Feb 2017 by Sergey Volk
Open source framework for monitoring Asp.Net Web Api 2 and MVC5 applications performance without using windows performance counters, automates performance counters data collection, store and visualization.
10 Jun 2016 by TheForceIsSharp
ASP.NET Core Web API, Multiple Get or Post methods with single controller
18 Jan 2017 by Bart-Jan Brouwer
.Net Core datagrid with server side paging, sorting and filtering
7 Apr 2016 by Sami Pylkkänen
Article shows how to setup ASP.NET 4.5.2 and ASP.NET 5 projects for Angular 2 application and how to enable Angular 2 typescript debugging in Visual Studio.
28 Dec 2015 by Dhruti90
MVC functionalities with web service with simple integration
27 Oct 2016 by Shashangka Shekhar
In this article, we will focus on how to enable CORS in ASP.NET Core application, get knowledge about CORS policy how we can share resource through different origin.
13 Mar 2017 by defwebserver
You can create database driven .Net Core applications using JavaScriptServices, and PrimeNG.
4 Jan 2016 by levelnis
How do you post to a Web API controller from an MVC controller?
28 Feb 2016 by Troy W. Locke
Setting up and using the new configuration system in ASP.NET 5 vNext
18 Apr 2016 by F-ES Sitecore
You could checkRequest.UrlReferrerIf it's empty it's likely they navigated straight to the page, if they came from a link on another page that page will be in there and you can check that it's a valid "from" page.Pretty bad idea in my opinion though, I'd just let them access the page...
15 Jul 2016 by Gabor L Ugray
A quick Windows programmers' guide to building a secure .NET Core web app for a Linux VPS and NGINX
21 Jan 2019 by User 11060979
In short: correct= (b
16 Dec 2015 by Dmitry Sikorsky
Using ExtCore framework to create modular and extendable ASP.NET 5 applications
4 Jan 2016 by levelnis
Send a success message to a View using TempData
14 Apr 2016 by Richard Deeming
Code running in the browser has no access to the local system. You cannot explicitly launch an application; you can only send the browser a document with a specific MIME type, and let the browser decide what to do with it.
10 Jul 2016 by Sourav Kayal
Application and Session state in ASP.NET Core
3 Dec 2016 by Adi_Mag
Integrate Serilog with ASP.NET Core application
16 Mar 2017 by Robert Bettinelli
Easy JSON Recursion in VB.NET with nested levels
31 Jan 2018 by Pawel idzikowski
How to replace the web API request query string to provide case insensitive OData search
26 Sep 2018 by MattiLindroth
An example on how to call Oracle stored procedures with UDTs from ASP.NET MVC / REST API
1 Jan 2022 by Member 9614352
I am new to Nhibernate and I don't know how to create a polymorphic relationship/mappings in my application. I have tried different solutions and tutorials but unfortunately I am still not been able to figure out how can I make this work. Following is my database structure in which...
29 Dec 2015 by arif_uap
Build your own web-api using new ASP.NET 5 with EF and IdentityUser inside OSX
4 Jan 2016 by levelnis
How do you display WebAPI model errors in MVC?
5 Jan 2016 by levelnis
In an earlier article, I wrote about reducing controller dependencies with generic factories. One criticism of this approach, which I agree with, is that it hides those dependencies. This article looks at an alternate approach - using facades.
18 Mar 2016 by Sascha Lefèvre
The solution is to dynamically build the required expression tree which normally gets done for you "under the hood" by using those LINQ methods.That's a moderately advanced topic but you don't have to do it yourself: There already are several solutions for this which you could use:Build...
21 Apr 2016 by F-ES Sitecore
Add the runat=server tag code behindprotected void ButtonSubmit_Click(object sender, EventArgs e){ ...
6 Jun 2016 by OriginalGriff
A DataReader is a one direction connection - once you read a row, you can;t go back to teh previous one.So when you use DataTable.Load to read from the SqlDataReader, it closes the Reader when it's finished with all data.Why are you trying to use the same DataReader to read all the data...
2 Aug 2016 by Mehdi Gholam
Yes it is.However you should probably start with more simple things and leave the more advanced topics until you are competent enough and have a lot more experience.
21 Sep 2016 by OriginalGriff
Start by looking at the GROUP BY - you have far, far too many clauses in there, which is why you get more rows than you want. (This may help you understand why: SQL GROUP By and the "Column 'name' is invalid in the select list because..." error[^])So start with a simpler GROUP By:SELECT...
20 Feb 2017 by Karthik_Mahalingam
try this protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { DataTable dt = new DataTable(); dt.Columns.Add("Id"); dt.Columns.Add("Name"); dt.Columns.Add("Description");...
10 Mar 2017 by Karthik_Mahalingam
change the connection string nameSqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["SST321ConnectionString"].ConnectionString);
2 May 2017 by F-ES Sitecore
In Visual Studio click on the DeveDefind reference under the References section and you'll see a property of the reference called Aliases and it'll be "global" by default. Change that to something like "DeveDefind". Now when you reference a class inside DeveDefind rather than referring to it...
11 May 2017 by mkcoder11
You have 2 textboxes one for id and another for showing name based on the id. Here the best solutions will be to use jQuery AJAX. This is how to proceed. 1. On the first textbox keydown event make jQuery AJAX to call C# function on your Controller. 2. This C# function will receive the id and...
6 Jun 2017 by Kornfeld Eliyahu Peter
At end of the day ASP.NET MVC will not work properly without those folders (Model, View, Controller)... So even you pick the empty template you will need them, and that means, that you have two choices - add those folders to the empty project, or clean the full project... What to pick? It depend...
14 Nov 2017 by jgauffin
Save time and effort with the help of codeRR, which finds and analyses errors for you, improving code quality along the way.
19 Feb 2019 by F-ES Sitecore
$('#iCnt') The above means an element with a literal id of "iCnt", eg; What you really want is the value of the iCnt variable, not "iCnt" as literal text $('#' + iCnt) That will construct a param like '#2' or '#3' depending on what is in iCnt.
17 Jun 2019 by OriginalGriff
The whole idea of random numbers is that they don't "select equally" as that forces a bias onto the stream of numbers. When you read random numbers between 0 and 9, the odds of a 5 on the first number is the same as the odds of a 5 on the second number regardless of the value selected as the...
6 Feb 2020 by Richard MacCutchan
Most likely something wrong with your parameters. You have: String ars = " - dNOPAUSE -sDEVICE=jpeg -r102.4 -o" + "C:\\Users\\syousif\\Desktop\\images" + "%d.jpg -sPAPERSIZE=a4 " + fileNameResultDirectory; I suspect the first hyphen character should not have a space after it. Should be "...
22 Jun 2021 by Richard Deeming
You've tagged this question as Entity Framework. If you're executing a query against the database, you'll need to use the appropriate function. For EF 6.2 or later, use DbFunctions.Like: var result = Set.Where(u =>...
5 Feb 2022 by OriginalGriff
Quote: "I tired to check for any errors in my code but there are no errors" If the resource was there and the code had no errors, you wouldn't have a problem! But we have no idea what you code is doing, or how it is doing it - and that's...
13 Jun 2023 by Graeme_Grant
It is unusual to see a success and error result returned using the same property name in a JSON result. This does not mean that it can not be handled. You have tagged your question with ASP.NET5, so I am going to focus on a .Net 5.0+ solution,...
18 Jun 2023 by Richard Deeming
Here's a nice example of creating a tree view in pure HTML and CSS - you don't even need any JavaScript: Tree views in CSS[^] Adapting that to add checkboxes to each item is fairly simple: ...
28 Jun 2023 by raddevus
The following code works. The convert to Double (commented out) does not work. string temp = "01-01-2013 00:00:00"; DateTime d = DateTime.Parse(temp.ToString()); // giving me error //DateTime conv = DateTime.FromOADate(d); string convT =...
23 Aug 2023 by Richard Deeming
Quote: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4
29 Aug 2023 by OriginalGriff
We've been discussing you: Can we have a "Help Vampire" icon?[^] It's a difficult one to describe ... In this specific case, I think what annoys me (and probably others) is the way he is using us to keep his job, to get paid without actually...
4 Dec 2018 by Yogi S.
This is how to create dynamic forms and send the values to the controller using Model Binding technique You have a Contact.cs Model: public class Contact { public int StreetNo { get; set; } [Required] public string Address { get; set; } [Required] public int Telephone {...
6 Mar 2024 by HEARTREAD
I tried to apply a mix of the two solutions It seems to work. Thanks for the quick support
16 Oct 2015 by 12045649
BY Adding this we can change color of ajax pie chart dynamicallyint i = 1;string color = "#f89020";foreach (DataRow row in ds.Tables[0].Rows){ if (i == 1) { color = "#00b0f0"; } if (i == 2) { color = "#676767"; } if (i == 3) {...
30 Oct 2015 by Maciej Los
Any possible reason of above error message, you'll find here[^].
8 Nov 2015 by Bounze
Found the solution!!Please protect your screen before reacting to what you're about to read (lol)...So I kept on looking on the Internet for possible solutions (after 3 days of this) and found one suggesting to go and add an exception for DEVENV.exe. I did, but still no dice. So I...
18 Nov 2015 by Abhinav S
It could be possible if you implement a web browser control inside the form and then display a website i.e. javascript / D3.However, there maybe some compatibility issues that you will need to work out.
6 Dec 2015 by DotNetSteve
Not sure that I would classify this as a solution, but I hope it would help you to understand a basic difference between webforms and mvc. A real big difference between the two is the hidden fields which are maintained by webforms for passing data (state) back and forth between the server...
6 Dec 2015 by dobravka
You need to read more about MVC. It is completely different world than Web Forms. Controllers are not codebehind of Views. Controller can change Models and pass it to the View or redirect to another View. You don't just access web controls from Controller and change them.For example if a...
5 Jan 2016 by levelnis
Article discussing how to handle posted data in an MVC controller action by using commands and handlers
5 Jan 2016 by levelnis
Article discussing how to unit test ASP.NET MVC controllers using NUnit and NSubstitute
14 Feb 2016 by Abhinav S
There is no need for System.web in ASP.Net 5.You need to use .Net core instead.Alternately, switch back to version 4.5.2.References - ScottGu's Blog - Introducing ASP.NET 5[^].Top 10 Changes in ASP.NET 5 and MVC 6 | Stephen Walther[^]
16 Feb 2016 by Richard Deeming
Based on the code posted in the comments, you're missing the path of the file in the image tag:Or, if you're using MVC4 or higher:
18 Feb 2016 by F-ES Sitecore
Use File.Exists[^] to see if the file already exists, and if it does alter it like adding a number to the end, then checking again and so on until you file a file that doesn't exist.Bear in mind people uploading at the same time though, you might want to implement locking around this code.
26 Feb 2016 by OriginalGriff
The best approach is to stop "rolling your own" login and entry system. Instead, use something like Introduction to Membership[^] as that handles the security for you, including forbidding access to pages the user isn't allowed into, and making him log in first if he tries to access a page...
14 Apr 2016 by OriginalGriff
The way I do it is to send the link as a "registration completion" page link with a GUID query string. The page looks up the GUID in a DB table and if it exists completes the registration and deletes the GUID entry.If it doesn't (or it's expired) it rejects the registration.
18 Apr 2016 by ZurdoDev
Using forms authentication you can also use location tags in web.config to define what roles have access there. See https://support.microsoft.com/en-us/kb/316871[^]Another option, and I prefer this one, is to have a base class that all of your pages inherit from. In that base class you can...
1 May 2016 by F-ES Sitecore
You create a model;public class MyModel{ public bool Saved { get; set; }}Update your action to use the model[HttpPost]public ActionResult Index(mone m){ lc.insert(m); MyModel model = new MyModel(); model.Saved = true; return View(model);}Amend...
16 May 2016 by F-ES Sitecore
You have two references to jquery UI so try deleting this oneEnsure you only have one reference to jQuery also.
23 May 2016 by Karthik_Mahalingam
You should use the model type as the Type returning from the Action.@model IEnumerable@model Listor var data = obj.personaldetails.ToList();var data = obj.personaldetails.AsEnumerable();
2 Jun 2016 by Dave Kreskowiak
You would have to write your own email server, supporting IMAP, POP3 and SMTP, that does this. The clients would have to connect to this email server, where you'd do your processing and formatting for a MSMQ message and queue this object up.For incoming mail, this server would have to be...
17 Jun 2016 by OriginalGriff
Assuming that returns the rows you want, try:...Select("CompanyID not in (" + oCompanyBO.SelectedSupplierIDs.ToString() + ") ORDER BY CompanyID ASC");
23 Jun 2016 by F-ES Sitecore
Your class structure needs to match the json structure otherwise the deserialiser doesn't know what properties to populate with what[DataContract]public class Order{ [DataMember(EmitDefaultValue = false)] public string orderMode { get; set; } [DataMember] public...
19 Jul 2016 by OriginalGriff
It depends exactly what you are trying to do: removing an absolute value (one that never changes) is trivial:string Batches = ",,H104001002,H104001003,H104001004,H104001005";string changed = Batched.Replace("H104001002", "");will do it.But...if string isn't "fixed" or can appear in other...
19 Jul 2016 by Hein Pauwelyn
You could try to use regular expressions (or regex). In your case the code will be this:using System;using System.Text.RegularExpressions;public class Example{ public static void Main() { string input = ",,H104001002,H104001003,H104001004,H104001005" string...
22 Jul 2016 by Patrice T
Quote:Can any one help me to get the work done ?No, and you even know why.Quote:I know that most of the browsers cant have access to the client local machine for some security issues.You are right, this is a security feature.But if you can let the user manually upload a file, it is...
26 Jul 2016 by Vignesh Mani
vspackage - vs2012 error: package 'visual c++ package' failed to load - Stack Overflow[^]
21 Aug 2016 by Maciej Los
I'd suggest to start here: Code Project Knowledge Base[^]You need to use ini reader/parser/writer, for example:INI Files[^]Ini Handler[^]Simplified INI Handling[^]
20 Sep 2016 by Karthik_Mahalingam
check this var json = [ { parent: '1', item: 'Electronics' }, { parent: '0', item: 'Play station' }, { parent: '0',...
23 Sep 2016 by Karthik_Mahalingam
try thiseventAfterAllRender: function () { var map ={Sun:'City1',Mon:'City2',Tue:'City3',Wed:'City4',Thu:'City5',Fri:'City6',Sat:'City7'}; $('.fc-widget-header th').each(function (i,elem) { var newText = map[$(elem).text()]; ...
28 Sep 2016 by F-ES Sitecore
Google "asp.net validation group". What you do is add your validation controls to "groups", so your login validation controls are in one group and the register form validation in the other group. That way .net will only fire the validation in the relevant group. If you google you'll find sample...
10 Oct 2016 by Afzaal Ahmad Zeeshan
Good request that you are making here. Sadly, there are very less guides that take Visual Studio Code into considerations and the one that do take it into consideration talk about .NET Core applications, and not the ASP.NET applications. I am currently working on a book titled, "Considering...
13 Dec 2016 by sunettew
CREATE TABLE #GetCon( id INT IDENTITY(1,1) PRIMARY KEY, con1 INT NULL, con2 INT NULL, value numeric(13,2) NULL)--You need to create a table for your variables. Why do you have multiple values con1, con2, con3, con4 etc?--You only need to assign to two.--You need to provide...
23 Dec 2016 by Patrice T
Quote:i don't know how to remove.Why do you want to remove the _ which is perfectly legal.Here is a link to RegEx documentation:perlre - perldoc.perl.org[^]Here is links to tools to help build RegEx and debug them:.NET Regex Tester - Regex Storm[^]Expresso Regular Expression...
13 Feb 2017 by Peter Leow
Check this out: Asp.Net GridView – How to Update Delete Insert in GridView in c#.net - C# Tutorials[^]
14 Feb 2017 by Nathan Minier
Your RouteArea is overriding the default route config (the controller name) when you move from convention to attributed routing.Try "/Manager/BuildingAdd/5"
21 Feb 2017 by Karthik_Mahalingam
try this $('tr', grid).on('click', function (obj, b) { if (['Update', 'Edit', 'Add'].indexOf(obj.target.value) > -1) return;
27 Feb 2017 by Karthik_Mahalingam
if (ddlDepartment.SelectedValue != "") { query += " and DepartmentName = @DepartmentName "; cmd.Parameters.AddWithValue("@DepartmentName", ddlDepartment.SelectedValue); }
24 Mar 2017 by Bryian Tan
Not clear what your query is trying to do, look like it is incomplete. I'm guessing this is what you trying to do. Let us know if that not the case.DECLARE @Table1 TABLE (ID INT,Value INT)INSERT INTO @Table1VALUES...
4 Apr 2017 by Karthik_Mahalingam
try var str = '4/4/2017'; var parts = str.split('/'); var month = ('0' + parts[0]).slice(-2); var day = ('0' + parts[1]).slice(-2); var year = parts[2]; var result = month + '/' + day + '/' + year;
24 Apr 2017 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a method return value but it contains null - which...
1 May 2017 by Wessel Beulink
Definitely use ASP.NET MVC routing and structure for handling database (sql server) do not combine this with angular or another framework. stick to Model - view - control, angular only used in views do not override model or control functions and structure leave that to your .net client. So...
11 May 2017 by ammu11
I have a textbox to enter Id and have another textbox to get the name of the person having the id in the first textbox. But the Id and firstname are in another table called students. Here my requirement is that when I enter the Id in the textfield I need to get the name of the student in the...
4 May 2017 by F-ES Sitecore
Html.Partial is injecting the view directly, it isn't calling the action on your controller so the model in your partial views are all null. If you want to inject the result of an action use Html.Action or Html.RenderAction instead (google for the difference, there are lots of articles that...
6 May 2017 by Ramesh Kumar Barik
6 May 2017 by Ramesh Kumar Barik
Try this. @model.CST_Name
7 Jun 2017 by Karthik_Mahalingam
Add the event handler separately and try. Button function funEventCheck() { alert("Testified"); return false; }
7 Jun 2017 by Richard Deeming
As mentioned in Solution 1, you shouldn't have multiple elements with the same id; you should use an alternative method to identify the button. But you're also going to find that the method you're using to wire up the event handler only works for elements which already exist. It won't handle...
13 Jun 2017 by Kornfeld Eliyahu Peter
The problem is mostly around 64 bit vs 32 bit... You run 32 bit and the installed driver for 64 bit OR you run 64 bit and the installed driver for 32 bit So or install both or fix the equation or read this: Solved - The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine[^]