skip to Main Content

Can someone help me use this Json file in c#?

I have been trying to display contents of a json file in a textbox for the past 6 hours and got nowhere. here's the c# code private thruster Getthruster() { string text = File.ReadAllText(@"./thrusters.json"); List<thruster> test = JsonConvert.DeserializeObject<List<thruster>>(text); textBox1.Text =…

VIEW QUESTION

Send file to Web Api – Asp.net

Hello I Have a request in web form code behind and i like call web api send Object with a property of type IFormCollection, the object properties sending but file not WebRequest wrqst = WebRequest.Create(URLService + method); var postData =…

VIEW QUESTION

Can't using ajax call api in dotnet core 3.1? – Jquery

my class api: [Route("Api")] [ApiController] public class ApiUsersController : ControllerBase { [HttpPost] [Route("Users/demo")] public ActionResult demo([FromBody]model data) { return "OK"; } } my script jquery: var model = {key: "123"} $.ajax({ type: 'POST', url: 'Api/Users/demo', data: JSON.stringify(model), dataType: 'json', contentType:…

VIEW QUESTION
Back To Top
Search