Posts by Randrade • 21,612 points
490 posts
-
10
votes1
answer721
viewsQ: What is dynamic code and static code?
Recently in a conversation with friends came the term dynamic code and static code. With this came a certain discussion. Some said that dynamic code is related to scaffolding, others with code…
terminologyasked Randrade 21,612 -
5
votes5
answers42959
viewsA: Function equivalent to Trim (function to remove extra spaces at the beginning and end) in Python?
What you seek is the .strip(). It is responsible for removing spaces at the beginning and end, such as the trim(). ' meu nome é wallace '.strip() You have other options, such as .replace(). str= '…
-
1
votes1
answer325
viewsA: Doubt with Microsoft version . NET Framework Asp.net mvc
Very simple. You are calling the Home controller in your RouteConfig, but your controller’s name is DefaultController. Simply change the name of your controller or the name in your controller…
asp.net-mvcanswered Randrade 21,612 -
3
votes1
answer157
viewsA: How to use Fluentvalidation ruleset functionality in Web API?
According to that Issue, in the project’s own Github, there is no way to do this and the author has no intention to do, not in the near future. Follow the text, in English, of the author: No plans…
-
1
votes1
answer1537
viewsA: Doubt with passing Parameter Asp.net MVC
You have some very serious errors in this code. First, you’re expecting a Model in his ActionResult, but is not passing a Model for her. Second, you are using [HttpPost] and is looking to pass via…
-
2
votes1
answer39
viewsA: How do I disable this notification? "Based on your project, we have identified Extensions you may find helpful"
This is a "boring" little problem that appears in Visual Studio Community 2015. You can see the discussion in this Issue . To solve the problem, just follow these steps: "The point is that an…
-
5
votes1
answer561
viewsA: Many Relationship Query for Many Entity Framework
In that case, it would be best to obtain the list of suppliers by the municipality, thus: var municipios= db.Municipio.Where(m => m.Nome == nome).ToList(); If the query returns only one…
-
4
votes2
answers136
viewsA: Complex type bind with Angularjs
You can solve this problem by creating the Object in this way: var pessoaFisica = { id: 1, Nome: 'Renan', Cpf: { Numero: '232432' } }; But this way you’re not using Angularjs itself, but creating a…
-
3
votes2
answers758
viewsA: Check for installed components
Just an alternative to @Omni’s excellent response. You have some ways to do this. One would be to list the installed programs and check whether or not the desired program exists. This way you search…
-
3
votes2
answers100
viewsA: Dropdown field increment
You haven’t added any information about your structure, so I’ll put a somewhat generic response. This is another inevitable case for the use of Begincollectionitem. First you need to install the…
-
9
votes1
answer379
viewsQ: Accentuation in meta Description
When using practice SEO on our website, we have to add to <meta name="description"> to be presented better, among other things. My doubt lies in using or accentuating the description. Is there…
-
8
votes5
answers1041
viewsA: localhost does not have access to the requested page
Like I said, you’re trying to make a Xmlhttprequest, and the url destination is blocking your request. As stated by the error, you are trying to access the domain…
-
1
votes3
answers533
viewsA: How to point the Entity framework to another database?
As you said in the comments you’re pointing to an Amazon server, I don’t know if it’s the same as your application, but try using this connectionString: <add name="DefaultConnection"…
-
1
votes1
answer369
viewsQ: Annotations Google Chart - Stacked Horizontal
I’m using the Google Chart to develop some graphics. I have the following chart working: <script…
-
2
votes2
answers157
viewsA: Add @onchange to Editorfor using Razor
Leaving this part to add directly to HtmlHelper you can do with jQuery. Would look like this: @Html.EditorFor(model => model.CEP, new { @class = "classe", id=ViewBag.Id }) <script>…
-
1
votes1
answer1565
viewsA: How to give opacity Hover effect in img’s?
You can simply put a dark background and give opacity to the image when passing the mouse that will give this effect. An example would be like this: .darken { display: inline-block; background:…
-
2
votes2
answers701
viewsA: Save and send selected item id in dropdowlinst
I do not advise using this form that I will show, the gypsy response expresses a better way of doing the search. I am posting only for knowledge purposes. Like the @Gypsy explained, there is no need…
-
2
votes2
answers399
viewsA: Use Viewbag as counter
You use only the ViewBag in your action will not have the expected result. What I advise is to send the number of the counter per parameter via Ajax, and return the value. Your Action would look…
-
12
votes1
answer1319
viewsQ: Display data with Google Chart - Stacked
I’m using the Google Chart - Stacked to create a chart on my system. Even this part is working correctly, as can be seen in the example below: <script…
-
0
votes3
answers1779
viewsA: How to do that by clicking a key a Submit is sent
Good, with javascript you can use the event onkeypress() to realize if the button pressed was enter, if it is you call the submit, would look this way: <input type="text" id="txtSearch"…
-
7
votes1
answer144
viewsA: Several Books for Author
This way what you are doing will not work at all. You are just manipulating html, but the server does not understand that you are passing a list of books to the controller. For this, the most…
-
52
votes4
answers6695
viewsA: Is it possible to make a tooltip with pure CSS?
There is another way to do this, where you have the element that will receive the tooltip and another to "be" the tooltip. It would be basically like this: /*Desconsidere essa parte, é apenas para o…
-
1
votes1
answer539
viewsA: How to apply slider effect on web page?
I’ll leave a simple example using jQuery and jQuery-UI. This is a kind of page transition, which can be made of N different shapes. Essentially, all you need is two div's on your page, and treat…
-
1
votes2
answers1474
viewsA: Button next to input text bootstrap 3
To do what you want with the input (icon + image) I recommend using Input Groups Bootstrap. It’s already prepared for this. And for your alignment problem, just use the Bootstrap memso grid system.…
-
3
votes1
answer88
viewsQ: Return Email from friends Facebook friend_list
Using the Graph-API from Facebook I can get various data from the user who is logged in to my system (a full list can be seen on Facebook doc). However, I would like to know if there is a way to get…
-
2
votes1
answer70
viewsA: Value and ID at Dropdown Waterfall
If you want to use the SelectListItem() change your action to this: var classesList = this.GetClasses(Convert.ToInt32(CanalMassivo)); var classesData = classesList.Select(m => new…
-
2
votes1
answer211
viewsA: Modal Box - Where to start? (example link)
Can yes As told by @Marconi in the comments, folder insert the form in modal. <script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.js"></script><style…
-
3
votes1
answer671
viewsA: Error after performing an action redirect to a page
I see nothing "wrong" in your code not to work, other than that try in its Action Index. If like you said, you’re saving in the bank and redirecting, it may be that this one is calling the catch in…
-
2
votes1
answer1092
viewsA: Create download link to an audio recording
This repository is really missing some files, and it would not be feasible to put it here. The complete repository you can find on this github. And the complete tutorial on how to use, you will see…
javascriptanswered Randrade 21,612 -
5
votes2
answers175
viewsA: Use links in geometric shapes
You can put the class trapézioInvertido in a div, and call your list within it. .trapezioinvertido{ float:left; border-top: 70px solid #c1c1c1; border-left: 30px solid transparent; border-right:…
-
11
votes6
answers8730
viewsA: How to create geometric shapes using CSS?
There are a few ways to do this. I will add some of the ways you asked here. #trapezoid { border-bottom: 100px solid red; border-left: 50px solid transparent; border-right: 50px solid transparent;…
-
4
votes1
answer2324
viewsA: Validate maximum size of an attachment
You can simply use the event .change() and verify that it has a value greater than the data-max-size. That would be your code: <script> $(function () { $("input:file").change(function () {//ou…
-
1
votes3
answers647
viewsA: Authorization of users to actions using the Authorize attribute
We’ll try to help you a little more. In this part of your code, you are only checking if there is a registered user in your database with this login and password. However, at no time do you really…
-
4
votes3
answers3683
viewsA: Run Javascript in the URL(plugins.)
You can save as favorite as you wish. I am with version 42.0 of firefox and it works as follows: Add the page as your favorite. Ctrl + D and finish. After that, go to the page you added, right-click…
-
4
votes2
answers4267
viewsA: Assign a value to my td inside a table with jQuery
The way you are doing it is correct. Make sure you are referencing jQuery correctly. Another possible problem is you are calling the function before the table is formed. If so, simply change your…
-
3
votes2
answers1053
viewsA: Put a datepicker in a mvc 5 view with jquery or similar
You’re confusing things. This package you reported is creating a htmlHelper. You should use it like this: @Html.DatePickerFor(model => model.Date, "autoclose=true", "todayBtn=true",…
-
3
votes2
answers94
viewsA: How to organize titles
I didn’t quite understand your question, but I’ll try to answer what I understood. The order of the headings H1, H2, H3,... "does not interfere" on the page. This will according to your layout and…
-
3
votes2
answers745
viewsA: Field saves only date and part of time is "zeroed"
I am assigning that you are using Datetime for dates. I see nothing wrong in your code, I believe you are not passing the values to time in your input. I think you’re filling in this way: When you…
-
6
votes1
answer1236
viewsQ: What is Browser Link?
When I use Visual Studio (I’m using the 2013 version, I don’t know if the previous ones have) with the Browser Link enabled, there is always a GET request in the browser console (F12). What would…
visual-studio-2013asked Randrade 21,612 -
9
votes3
answers16306
viewsA: Validate Credit Card Number
You can use the attribute Creditcardattribute to validate. How you are using Asp.net-mvc-5 I believe you’re already familiar with the Data Annotations. It has an attribute called [Creditcard], which…
-
2
votes2
answers1205
viewsA: @Html.Actionlink and Url.Action are not taking the route of the controller annotation
Apparently it’s all right, just use the Routedata.Values to recover the value of querystring instead of Request. Would that be your variable cat: var cat =…
-
2
votes1
answer1247
viewsA: How to take the Dropdownlist ID and move to a jQuery variable?
That way you’re not selecting the id dropdown, and not even taking the selected value. Let’s go in pieces. First, to select an element by id you use this "syntax": var elemento = $('#IDAqui'); The…
-
3
votes2
answers7764
viewsA: Lock special characters but allow hyphen
Just you make a small change in your regex allowing this. Your regex would look like this: RegExp("^[a-zA-Z0-9-Zàèìòùáéíóúâêîôûãõ\b]+$"); example would look like this: $('#nome').on('keypress',…
-
2
votes3
answers1868
viewsA: How do I pop buttons on top of my div?
Since you already have a css response, I’ll post one using jQuery just to have another way to do it. First let’s create the buttons on each div, thus: <div class="divButton" id=""> <button…
-
1
votes1
answer39
viewsA: Action is not receiving the value of the parameter
Your problem is that you do not have the route configuration in your file RouteConfig.cs, so you can not pass the URL this way. To solve your problem, you can pass the parameter by querystring or…
-
2
votes1
answer1209
viewsA: How do I use @Html.Actionlink to create links to a multi-trace route?
Are you using the Attribute Routing, then remembering only that you should call the method Mapmvcattributeroutes() your RouteConfig with the following line: routes.MapMvcAttributeRoutes(); Done…
-
3
votes2
answers28732
viewsA: Personalize an Alert
You can create a html customized, looking like a modal, and create a function to show the same, as if it were a Alert. An example would be like this: Alert.render('Alert Diferente') #dialogoverlay{…
-
2
votes2
answers446
viewsA: Javascript - Showing and hiding Ivs according to selected checkboxes
Using only javascript you would use the same logic as the checkbox. You will create a class and hide all the elements. After that, you will scroll through all and check if it is the past id. If it…
-
1
votes3
answers636
viewsA: How to deselect checkboxes when only one is selected?
In javascript you must call a function when selecting the checkbox. You can add to onclick() that you already own. In this example, I will use the class (cb) of checkbox to select which ones will…
-
1
votes2
answers1558
viewsA: How to fix search box on menu?
In your case, you could simply put your form inside a li and align the same right. For this you can create a class and align the right in this way: li.right { float:right; } Once done, simply add…