Posts by Andre.Santarosa • 330 points
18 posts
-
1
votes1
answer27
viewsA: Error sending Controller object to View
The method where() returns a IEnumerable<T>, that is, a collection of objects of a particular type, in your case, a IEnumerable<Usuario>. The problem there is that your view expects an…
-
0
votes2
answers517
viewsA: Pass parameters through the url
Whenever you need to pick up something coming by route, you need to specify on [HttpGet]. Do the following in the method developer: [HttpGet("{id:int}")] public async Task<ActionResult>…
-
0
votes1
answer731
viewsA: How to put Character limit in Text (script)
We can assemble an extension method that does this and can be called more easily // Recebe texto e o tamanho máximo da string public static string Truncar(this string texto, int max) { // Checa se o…
-
0
votes1
answer558
viewsA: Line breaks in table cells ASP.NET MVC C#
You can do this using CSS table{ white-space: nowrap; }
-
0
votes1
answer153
viewsA: Delete method (Restful)
You can pass an array of integers or a list of integers as parameter. When deleting Voce opens a transaction, traverses its array and deletes record by record, when finished, Voce commits the…
-
0
votes4
answers479
viewsA: Remove object from an Arraylist
You can use a lambda expression int idConsulta = Convert.ToInt32(consulta_box.Text); listVagas = listVagas.Where(x=>x.getBox() != idConsulta).ToList();
-
0
votes2
answers955
viewsA: Pass variable to another form, dynamically generated C#
You can pass the other form startup. Form2 form2 = new Form2(listaDeDados);
-
1
votes3
answers807
viewsA: Remove row from an array
You can use a lambda expression to do that strArray = strArray.Where( x=>!x.Contains("M31")).ToArray(); He’s gonna get his array, see which of the items does not contain the string "M31" and…
-
0
votes2
answers54
viewsA: What function to use
You can create a table with the values and use a PROCV to search for the value within the range and its corresponding A B C D E F G H I -----|-----|-----|-----|-----|-----|-----|-----|-----| 1 | | |…
-
0
votes1
answer1389
viewsA: Update DIV without refresh with Ajax
PHP is generated only once from the server side and then transferred with all the necessary information to the browser and renders the page. What Voce can do is build a file . php which gives an…
-
2
votes2
answers3060
viewsA: Delete line from a list in C#
Try it this way: mylistnova1.Remove(mylistnova1.Single(item04 => item04.propriedade == comparador));
-
3
votes4
answers855
viewsA: Deserialize JSON
Use the Javascriptserializer present in the namespace System.Web.Script.Serialization; It has a method called Deserialize where Voce passes the JSON object and the type in which JSON will be…
-
1
votes2
answers1925
viewsA: What is Serialize and Deserialize for?
With Serialize, Voce creates a series of data, for example a JSON. You can serialize a List list in a JSON to return to a page and fill a data grid via javascript, for example. The same goes for the…
-
3
votes2
answers196
viewsA: How to return a validated array to a form?
You can store the array in a session variable... The session variables can be accessed from any page, which would solve the problem of information transit... Ex: $_SESSION["nomeDaVariavel"] =…
phpanswered Andre.Santarosa 330 -
1
votes2
answers1743
viewsA: How to put responsive background in col-Md
That should suit... background: url(../img/view.png) no-repeat;
-
1
votes3
answers1108
viewsA: Manipulating with Update Panel
Within this scenario I would not know how to work, however we could approach in a different way. Create a div with runat=server, thus, in onload page Voce can hide it via codebehind, or if you…
-
0
votes2
answers291
viewsA: how to log in divided into two parts?
I’m pretty rusty with PHP, so try to exemplify with a Generic code here... I think the most interesting way would be to work with Session if(classeDeLogin.validaUsuarioParte1('usuario','senha') {…
-
0
votes1
answer361
viewsA: Ajax - Float type parameter
In fact, everything you put into JSON technically turns into a string that will be passed to your controller. So the only thing you would need to do is convert this string to float in your backend.…