Posts by Randrade • 21,612 points
490 posts
-
5
votes1
answer433
viewsQ: Open Popup (Bootstrap) by clicking on the checkbox
I have a table, where the user selects the months that have already been performed the checks. To perform this check, just mark a checkbox. However, I have a new demand, that when the user clicks on…
-
2
votes3
answers757
viewsQ: Error while updating data
I have a base repository where I only perform CRUD. When working with one data at a time, it works normally. However, I needed to make a modification and send several records to be edited at once.…
-
0
votes1
answer370
viewsA: IIS 7 sites, working with domainname.com not www.domainname.com. DNS problem?
This can occur when your dominio.com was not added as A record and the domain www not added as CNAME (Canonical Name Record). Try to check on your hosting if your domain is configured this way:…
-
3
votes1
answer118
viewsA: How to navigate a website if a single page?
Just add a anchor on your page. Where you mark the menu with a code, and the div that it will call. A basic example of would: <a href="#principal" >Home</a> <div id="principal">…
-
0
votes3
answers972
viewsA: Independent Project Injection of Dependencies Ninject
In your project CrossCutting you use the Commonservicelocator. A project that I use for this is the Ninjectadapter.Unofficial(as the name says, is not official, but always met my needs). The…
asp.net-mvcanswered Randrade 21,612 -
2
votes1
answer90
viewsQ: Search all table fields in an Action
I would like to know how best to prepare a query that searches in all fields of a table. Let’s say I own a news site, and on this site I have a input for Search in my template. When entering the…
-
1
votes2
answers1388
viewsA: Modal not redirect when running Post
Well, the best solution I’ve found so far is this: I created a requisition Ajax, where I call the Modal for her, so: <div class="col-md-4" align="left"> @Html.ActionLink(" ", "Adicionar",…
-
1
votes2
answers1388
viewsQ: Modal not redirect when running Post
I own a View where I open a Modal to register a new data. It is working perfectly. The problem is that when registering using this Modal, it redirects me to the pre-defined page in cController.…
-
4
votes2
answers4080
viewsA: Fill Second Input automatically when First
You could create a function to get the value of the first input and define a second variable to add, in your case, the value of 2. So it will take the value, and add with the number defined in the…
-
0
votes1
answer561
viewsA: Error using Automapper " Class Not Found"
I got it here, I was checking the error in the wrong place. The problem was in my class Pessoa. I own a ICollection . When starting it in the constructor, it worked perfectly. public Pessoa() {…
asp.net-mvc-5answered Randrade 21,612 -
0
votes1
answer561
viewsQ: Error using Automapper " Class Not Found"
I’m studying the use of AutoMapper, but I get an error in my project. Automapper version: v3.3.1 I added the Config in my Global.asax, ficando assim: protected void Application_Start() {…
asp.net-mvc-5asked Randrade 21,612 -
2
votes1
answer2432
viewsA: Sort at the lowest price in a Mysql table
Just you add this code at the end of your select: ORDER BY `preco` Asc In this case, you use ASC to sort in an ascending and DESC to sort in a descending fashion. A select complete would look like…
-
3
votes2
answers2044
viewsQ: Enable button event by pressing key on keyboard
I am developing a calculator, and I need when the user presses the key enter passed on as if he were pressing the key igual. The calculator is inside a form, then I use this code to disable the Post…
-
1
votes1
answer184
viewsQ: What is this content in Bootstrap for
I’m using the Bootstrap version v3.0 and analyzing the file CSS, found that stretch: *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } I…
twitter-bootstrapasked Randrade 21,612 -
1
votes1
answer768
viewsA: How to send an object ID in jQuery autocomplete?
In his Controller you can return the Codigo and the nome in a Json , leaving your consultation more performative. Would something like this: public ActionResult Find( string term) { var resultado =…
-
0
votes2
answers1539
viewsQ: Publish Windows Form C#
I have an application developed with Windows Form C# + Entity Framework V6.1.3, where I use an existing database. The application works correctly, in Visual Studio 2013, where I am developing. My…
-
3
votes3
answers10463
viewsA: How to use @Html.Radiobutton, how to send the selected option to the controller?
If your problem is just sending the selected value to the Controller, just change the part of your RadioButton. I think you just mixed it up HTML with Helpers. But this part in your View:…
-
3
votes1
answer2863
viewsA: How do you use Bootstrap Popover?
Well, if that’s what you need, here’s an example of how to use the component Popover var image = '<img src="http://i.stack.imgur.com/92bh0.png" width="150px" height="150px">'; $(function () {…
-
11
votes3
answers1771
viewsQ: Code comments when working in a group
When working in a group, developing code with other people, using specific tools and everything, what is the best way to comment on the code? Well, let’s go to the stage. By owning the project in…
-
6
votes3
answers37193
viewsA: How to enable and disable fields by clicking button
Well, you can start with your inputs with the option disabled and enable by clicking the button Iniciar Tarefa your script would look something like this: $(document).ready(function() {…
-
0
votes1
answer4072
viewsQ: Send Javascript confirmation message
I have a method to send Email via PHP that is working correctly. I would just like you to at the end send a reply to the user, by a alert javascript same. My form is like this: <form…
-
13
votes7
answers1131
viewsA: Too many screens or a screen with too much information?
Well, in your case the question may change over time. Because from 3 to 5 years ago today’s interfaces would not be possible. There is no "best way to work" convention with interface design, until,…
-
2
votes1
answer1577
viewsQ: Doubt about X-Frame-Options
Yesterday I had a problem with the X-Frame-Options, as can be seen in this post. However, I added the solution, and it worked perfectly. I’ve added the solution, but I have no idea what it does, and…
-
2
votes1
answer1346
viewsA: Error while using iframe
Following suit of this post, just add this code into my Global.asax and managed to open normally. protected void Application_PreSendRequestHeaders() { Response.Headers.Remove("X-Frame-Options");…
-
2
votes1
answer1346
viewsQ: Error while using iframe
I have an application developed in Asp.NET MVC-5 and published on IIS normally. When accessing the application by the link the same works correctly, all links. However, I need to place this page…
-
2
votes1
answer1309
viewsQ: Add values from object list columns in Razor
I have a table, where I receive data from a View (SQL Server) and perform some operations on my page. On this page, I have a filter to show only the pages referring to the selected year. Even this…
-
3
votes1
answer265
viewsQ: Compare TXT with Table in database
I have a TXT file generated by SISOBI, where it contains a list of people who died. This txt is generated, and I need to read the file and compare the CPF, which is the only key present in the file,…
asp.net-mvc-5asked Randrade 21,612 -
8
votes1
answer1863
viewsQ: Encrypt Web.config
I come here with a question about ConnectionStrings of Web.config. Seeing that normally, we inform a form of authentication on ConnectionStrings for the application to access the database. And by…
-
1
votes1
answer1208
viewsA: How to print a View to a standard printer using Javascript or c#?
An alternative is you call the function print() of JavaScript. That would be your code: This CSS only serves to not show the print button by clicking on it @media print { .no-print, .no-print * {…
-
3
votes2
answers4494
viewsQ: Scroll through a list of characters
I have a method that checks the number of characters in a string, and separates them into variables with the information as can be seen in this example. The problem is when you have a list of data…
-
9
votes1
answer8805
viewsQ: Separate string by number of characters
I’m developing a component to read the file sent by Dataprev with the list of monthly obituaries. This file is a TXT and every 210 characters is a different person. The documentation can be seen in…
-
1
votes1
answer307
viewsQ: How to fill a code column for reference with repeated values
I have a query where I have returned several data of each user. However, when performing a search, I have as return the repeated data. I know that this repetition of the data happens because I do…
-
2
votes3
answers2872
viewsA: How to Set a Larger Size for a Textboxfor
You can use the Htmlattribute, and use html tags inside your textbox. In your specific case it would look like this: @Html.TextBoxFor(model => model.strTituloEmail, new { @class = "form-control",…
asp.net-mvcanswered Randrade 21,612 -
5
votes1
answer2318
viewsA: in the eclipse how to generate a project jar aquivo?
Find in the Package Explorer view the project from which you want to generate the JAR file, right-click and select the Export option. In the Wizard that appears, type the word "jar" in the text box…
-
1
votes1
answer227
viewsQ: Error when filtering data from Datatable
I own a Viewbag where I populate a select with a list of years. When selecting a specific year, filter the table with data only from those years. To make this filter, I’m using a script:…
-
1
votes1
answer2360
viewsQ: Filter data from a table through a Dropdown
I have a table returning the amounts paid by taxpayers. However I have to return all the data (because the application adds field to field). So far so good. But to show the user, I need to filter…
-
1
votes1
answer69
viewsQ: Restart count when changing year
I have a View that returns data that the taxpayer paid the pension in the current year, where I return the monthly payment of the same. I need to perform the sum of the months, creating a monthly…
-
1
votes1
answer973
viewsQ: Perform field sum in the table
I have a View that returns data that the taxpayer paid the pension in the current year, where I return the monthly payment of the same. I need to sum up the months by creating a monthly subtotal.…
-
3
votes3
answers707
viewsQ: Sum table values
I have a table where I return the amounts paid per taxpayer monthly. But I need to create a subtotal field, adding up the values of each month. Very similar to the Fibonacci sequence. The problem is…
-
0
votes1
answer434
viewsQ: Returning selected data to Razor in anonymous object
I have a controller where I look for the birthday kids of the month. But I have more than 1000 birthday girls per month, returning a table with more than 50 attributes of each one, thus making the…
-
1
votes2
answers269
viewsA: Text appears behind the menu
You can work with the property float, and size according to your need. Add this code to your CSS: .menu { float: left; width: 30%; top: 20%;} .conteudo { float: right; width: 70%; } Refer to css in…
-
2
votes2
answers457
viewsA: Adjust text color in submenu
If you want to leave black, just add the color tag: #000; no #bt-menu ul a . #bt-menu ul a { padding: 10px; width: 190px; _height: 10px; /*IE6 only*/ display: block; white-space: nowrap; float:…
-
1
votes1
answer2862
viewsA: How do you check if a view exists before you have it created?
If you don’t want to change or delete the View that already exists, just check if it exists, if it exists perform some action or do nothing. IF NOT EXISTS ( SELECT * FROM sys.views v INNER JOIN…
-
3
votes2
answers4065
viewsQ: Forward tab by clicking the button
I have a form for registration divided into tabs, where the tabs are disabled until the user clicks on the button to enable and go to the next one. The problem is that the way it is the user has to…
-
1
votes1
answer359
viewsQ: Two selects with the same script
I have a select that uses a script to fill the city field, through the selected state. The problem is that I need to add another select and when I add, only a select works. <script…
-
1
votes4
answers1380
viewsA: Warning box after click div
You must first download the files needed to use the Bootstrap and Jquery. After downloading, put the files in your project and refer the files to your page that you want to use the component…
-
3
votes2
answers600
viewsQ: Enable select HTML with
I have a table, where fields start disabled, and in a checkbox I choose which field to enable. Tagged input, works perfectly. But when I try to use with the select the same script does not work. I…
-
5
votes2
answers6021
viewsA: Button/link inside a view redirecting to another view
You can call the View Index directly from the Active Controller: <a href="@Url.Action("Index", "Ativos", Model.Id)" title="Cancelar" class="btn btn-info"> <span class="glyphicon…
-
20
votes4
answers55577
viewsQ: How to validate client-side CPF with script?
I’m working with a CPF validation on my controller, but I need to validate when the customer leaves the input of the CPF and then return a message warning when the CPF is incorrect, through a alert…
-
0
votes2
answers1309
viewsQ: Highlight selected row of the table
I have a table where I select a Checkbox to enable a certain input. I would like that when I selected that same checkbox, the entire row of the table would be highlighted, showing that the user…