Posts by Junior Dias • 741 points
29 posts
-
4
votes1
answer527
viewsQ: Compile directives from the Controller
I have a table that is rendered dynamically when passing an array of data to it. I have access to the data of each "row" as follows: { "data": function (data, type, val, meta) { return "<div…
-
1
votes1
answer416
viewsQ: Async Method with Await in his Return
public async Task<IHttpActionResult> NomeMetodo([FromUri] Filtro filtro) { return await Task.Factory.StartNew(() =>Ok(_aplicacao.RetornarDados(filtro))); } I wonder why the above method…
-
0
votes1
answer128
viewsA: Project only runs if Visual Studio is installed on the client machine
Problem solved: For some reason my system is looking for IIS express, which is only enabled with VS installed (or manually by IIS itself), so without VS it didn’t work because it didn’t find any…
-
1
votes1
answer128
viewsQ: Project only runs if Visual Studio is installed on the client machine
Hello. I have a project done in WPF, which uses data returned by web services to interact with the user. This system, when starting, consults the IIS to see if it is standing, if the web services…
-
0
votes0
answers170
viewsQ: HTML (DOM) testing with Jasmine or other framework
How do I test HTML with Jasmine? I know there’s a guy named jquery-Jasmine.js who does this but I have no idea how to install it because npm doesn’t work when I try to install it (it says that Git…
-
6
votes1
answer1941
viewsQ: Change the . NET 4.5 project to 4.5.2, how to do it?
I installed . NET 4.5.2 on the machine, restarted Windows 7 and, after opening the project, went to Debug > Projeto.Properties > Application and tried to change the version by combo Target…
-
2
votes2
answers1470
viewsQ: How to find out if the session has expired?
I need to find out when the session expires, in ASP.Net MVC, so I can show a modal and redirect. How can I do that? There’s something in the httpcontext that I can use?…
asp.net-mvc-5asked Junior Dias 741 -
2
votes2
answers955
viewsQ: Change the image size according to its URL
good morning! I researched (and even found a js called Holder.js that apparently does what I want, but I couldn’t understand it) a way to do the following: Image URL at 700x700 ->…
-
2
votes1
answer493
viewsQ: aspx page running on Asp net mvc
Good afternoon, I have an aspx page that, through some components, can generate several documents used in the company. Well, the page is in aspx and uses proprietary components (Dlls), I can not…
-
9
votes3
answers1650
viewsQ: How to make a POST that passes beyond the form, a file?
My question is the following: I can pass to the controller OR the file OR form. I wanted to know if there is any type (like Formcollection, but this apparently only receives the form itself, the…
-
0
votes4
answers1377
viewsA: Error on AVD startup - Android Studio
Delete and recreate your virtual machine, if it doesn’t work try updating your SDK. If it still doesn’t work download another SDK, your may be missing files.
-
1
votes1
answer108
viewsQ: How to make a pager without a gridview?
I have a system in Asp net mvc, in one of the screens is displayed several items, the select to catch them from the bank is: Select top 20 from Produtos As demonstrated, it displays only the first…
-
2
votes1
answer599
viewsQ: Taking an object from a list by reference and not by position
Hello, I would like to know how to create a list of objects in C#, but instead of picking them by posição ([0], [i]), I want to take by reference [LacoAzul] [CorVermelha]. You can create a list like…
c#asked Junior Dias 741 -
4
votes1
answer148
viewsQ: Reflection Emit, what’s the point?
Passing a code to MVC, I saw there was a Label label= new Label(); that was underlined with red, when clicking to see the suggestions, I saw the following: using System.Web.Ui.WebControls using…
-
1
votes1
answer130
viewsQ: How to receive unique data in Asp net mvc
I have the following model called Conta: public int Codigo { get; set; } public string Nome { get; set; } public int Prazo { get; set; } assuming I want to select (without using lambda) and bring…
-
2
votes1
answer310
viewsQ: Make a query using Entity Framework and Stored Procedures
I have the procRetornaCliente process that receives the following parameters: Id, areaAtuacao, City. Mapping it on EDMX, I got a Complex Type (procRetornaClienteModel) with all fields mapped, but do…
-
1
votes2
answers301
viewsQ: How to return an int in a Decimal property
I have an SQL string (made by another programmer a long time ago, so I can’t change it) that returns something like this: If it has value in column, returns value, otherwise returns 0 (I would post…
-
1
votes2
answers300
viewsQ: What can I use to replace the Hidden input in ASP NET MVC?
I have a difficult mission that is to pass a system of webforms to MVC, the system with webforms has many input hiddens that store basic information such as session hash and user code, but like me,…
-
3
votes1
answer425
viewsQ: Divs with float right without its inverted position
I’d like to know how to ensure that two DIV, both with float:right, do not reverse the position of each other, for example: <div id="divMaster"> <div class="pull-right" id="Div1">…
-
1
votes1
answer65
viewsQ: Delete From does not work on C#
Why the code below does not work (does not delete)? using (Banco db = new Banco()) { String strSql = "Delete from Cliente where codcliente=" + Session["_uiUserID"]; db.Cliente.SqlQuery(strSql);…
-
3
votes2
answers1365
viewsQ: ASP NET MVC5 - How to enable and disable HTML elements
The program has in the session some customer data, as CPF and Full address (including state where you live). If the customer is from São Paulo, enable a specific combo, if it is from another state,…
-
3
votes1
answer3372
viewsQ: How to make a complex SQL query in . NET MVC
I would like to know how to make a query, using multiple fields, multiple tables with Inner joins in ASP.NET MVC without having to put the SQL string in the code, using the Entity Framework. At the…
-
2
votes1
answer112
viewsQ: Model with dynamic type properties
I have a select on the bench that brings several items and loads everything into one model. The point is that one of the items, depending on how the select is done, is brought in a different type.…
-
3
votes2
answers340
viewsQ: Is it bad practice to use foreach inside the View?
It’s a bad practice to use foreach within the View? If it is, how to do it?
-
2
votes1
answer728
viewsQ: Select column type that comes in a SELECT
Hello, my question is this:: I have a Select in Sqlserver of two tables with Inner Join, they return me a set of 5 columns. I would like to know how to list the type of these columns. I know you…
-
2
votes1
answer1122
viewsQ: Make an SQL query with Entity Framework 4
How do I perform a query in the database using Entity Framework 4 passing a string previously stored inside a StringBuilder. The reason is that the SQL query string is giant. I know it is not a good…
-
0
votes1
answer179
viewsQ: Col-Md=xx bootstrap
my doubt today is as follows: I can put a larger col-Md inside a smaller one? For example: <div class="col-md-6 "> <div class="col-md-12"> <p> Texto aqui</p> </div>…
twitter-bootstrapasked Junior Dias 741 -
3
votes1
answer159
viewsQ: (ASP NET MVC4 or 5) How to pass a custom name to Xmlhttprequest?
Guys the question is this, I have a <input type="file" id="fileupload"/> and a field <input type="text id="Nome"/>. To pass it to my controller, I do the following: var data =…
-
1
votes1
answer1497
viewsQ: System.Web.Mvc.Web missing, what can I do?
After a few updates, my helpers started giving problems, for example, if I were to use the @Html.TexBoxFor, Razor would never recognize. After doing a lot of research, I was asked to use the @using…