15,893,190 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by SijoXavier (Top 4 by date)
SijoXavier
1-Apr-18 6:30am
View
Here is my sample code which shows the same behavior
Index.cshtml
<!DOCTYPE html>
<title>Index
Load1
Load2
Clear
$('#btnLoad1').click(function () {
$('#lbl1').html('Loading.....');
$.ajax({
async:true,
url: "/Home/Load1",
type: "Get",
dataType: "html",
contentType: "application/json; charset=utf-8",
success: function (data) {
$('#lbl1').html(data);
},
error: function () {
alert("An error has occured!!!");
}
});
});
$('#btnLoad2').click(function () {
debugger;
$.ajax({
async:true,
url: "/Home/Load2",
type: "Get",
dataType: "html",
contentType: "application/json; charset=utf-8",
success: function (data) {
$('#lbl2').html(data);
},
error: function () {
alert("An error has occured!!!");
}
});
});
$('#btnClear').click(function()
{
$('#lbl1').text('');
$('#lbl2').text('');
}
);
Server side:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace AjaxMultipleRequest.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View ();
}
[HttpGet]
public ActionResult Load1()
{
System.Threading.Thread.Sleep(10000);
return Content("Loaded data set 1");
}
[HttpGet]
public ActionResult Load2()
{
return Content("Loaded data set 2");
}
}
}
SijoXavier
1-Nov-17 6:34am
View
Oh my bad ,Thanks a lot Maciej,will try for an external sql server for lunux option
SijoXavier
31-Oct-17 5:25am
View
Local db inside visual studio
SijoXavier
31-Oct-17 5:16am
View
Hi Maciej,thank you for your response,I was actually referring to the Visual studio 2017 for Mac not the visual studio Code.