Posts by Daniel Coelho • 75 points
11 posts
-
0
votes3
answers82
viewsA: Error formatting date in C#
It can be done as follows. string s = linha.data.ToString().ToString("yyyyMMdd");
c#answered Daniel Coelho 75 -
1
votes3
answers801
viewsA: How to concatenate an object with a variable to be dynamic?
var user = '{"name": "Alexandre", "email": "[email protected]"}'; var usuario = JSON.parse(user); for (var x in usuario) { console.log(usuario[x]); } …
-
0
votes2
answers207
viewsA: ENTITY FRAMEWORK - make a query like SQL
You can use Startwith, which would be like Like 'Test%' or Endwith, which would be like Like '%Test'. Following example: Context.Item.Where(c=> c.descricao.StartsWith(termo)).toList();…
entity-frameworkanswered Daniel Coelho 75 -
1
votes1
answer168
viewsA: Create a list with a Model and an Int in C#
You must use a Viewmodel, which is a Model aimed at what will be displayed in the View. In other words, you can create a Model, Promocaoqtdevendidaviewmodel, for example, where it will have two…
-
0
votes2
answers1357
viewsA: Multi threads c#
Use Thread Pools. Example: using System; using System.Threading; public class Fibonacci { private int _n; private int _fibOfN; private ManualResetEvent _doneEvent; public int N { get { return _n; }…
-
-3
votes4
answers1255
viewsA: Converting Httppostedfilebase to byte[] : Exception_wasthrown
A good output is to resize this image. public ActionResult Thumbnail(string filename) { var img = new WebImage(filename).Resize(291, 285, false, true); return new ImageResult(new…
-
0
votes3
answers839
viewsA: GRID bootstrap system - col-Xs-X does not recognize width
You have to look for this resizing, in the sense that it is even resizing to mobile, because you may be resizing to tablet, where the tablet uses the Sm class. Furthermore, there is a class 'c'…
-
0
votes2
answers342
viewsA: How to receive a javascript value within a c# ASP.NET block
As far as I know you can only do this by running a Submit for a method within C#. For this you can create a form variable and call the Submit method, passing the values you want by parameter.…
-
1
votes1
answer360
viewsA: WEBSERVICE ASP.NET Method not found
Good afternoon. It’s hard to opine without seeing the code, but the first thing I would do is force a [Httpget] into your web method. Example: [HTTPGet] public string VAPS() { ... } Have you tried…
-
0
votes1
answer144
viewsA: Share Web API access token in different domains
I was able to do it through cookies. I don’t have a necessary experience in this matter to know if it is good or bad practice. Can you comment on that, please?
-
2
votes1
answer144
viewsQ: Share Web API access token in different domains
Hello. I’m having a hard time sharing an access token (bearer) with different domains. This happens because I have to make a login page outside the domain of the site that consumes the REST API.…