Posts by Fabio Souza • 1,859 points
116 posts
-
1
votes2
answers393
viewsQ: Message to the user in Label with Jquery
I’m validating the registered user’s email, and I want to display the message to him if the email already exists, so I did so: //validação de email $(function validateEmail() {…
-
3
votes1
answer630
viewsQ: Replace Javascript (How It Works?)
Is there any way anyone could explain to me how Replace works? I’m trying to count the number of characters typed by a user in the zip code, but it is with Mascara, and then the blank fields are…
javascriptasked Fabio Souza 1,859 -
1
votes3
answers145
viewsQ: Avoid editing in the field
I am trying to do the following: the user type his zip code, and then it is filled automatically, estado(select) cidade(select), rua(input) and bairro(input), when the user enters his zip code and…
-
1
votes1
answer265
viewsQ: Pass ID to Controller
I have the problem that when I click on the Register button, the City does not pass the ID. I did. The ID is being passed to the screen, but when passing to the controller is not. <div…
-
0
votes1
answer749
viewsQ: Apply CSS Style to Razor elements ex: Editorfor
How do I apply a style to all EditorFor of my View? Field example: @Html.EditorFor(model => model.Photo, new {htmlAttributes = new {@class = "form-control"}}) I tried to do it this way but I…
-
2
votes2
answers244
viewsQ: Remove Arrows from Editorfor
I created my class with the guy int [Required(ErrorMessage = "Preencha o Numero")] [DisplayName("Numero")] public int Number { get; set; } and so on Layout generated these little arrows, how do I…
-
3
votes1
answer80
viewsQ: Image does not appear 100%
I’m trying to create a LandingPage but the first image is being cut I’m using this CSS: .parte1 { min-height: 100%; max-height: 100%; padding-top: 50px; padding-bottom: 50px; text-align: center;…
-
1
votes1
answer443
viewsQ: Fill a list with Json return
I wanted to fill in a textarea or anything that looks like a list, with the items that the guy selects from a dropdow. So I thought so, but I don’t know how to feed the list... <textarea cols="1"…
-
1
votes1
answer61
viewsQ: Join for 2 tables
How do I use the Join method to give a include of a value from another table? In this case I was going to use the Chamadamusicas table and the Musicavotadas table var chamadaMusicas =…
-
1
votes1
answer144
viewsQ: URL by Viewbag
I wanted to run a URL through Viewbag, but I couldn’t. I wanted to do it: ViewBag.Quantidade = "Você Não tem quantidades suficientes, para continuar você deve comprar um Pacote"; ai in case the text…
-
4
votes2
answers392
viewsA: Open View with Parameters
The solution I found to solve my problem was the following way, where the id and tipo were passed by parameters via URL. For the window to be opened I used the window.location.replace (which opens…
-
3
votes1
answer384
viewsQ: Passing a javascript variable to Session
I wonder, how do I send a value I have in javascript to a @Session. in case it would be more or less like this: I have a variable: var id = $(Person). val(); this ID wanted to use in a session…
-
3
votes1
answer325
viewsQ: How to call a View by passing parameters through json
I have this code that passes parameters to my controller: var id = $(Musico).val(); var url = '@Url.Action("Votar","Chamada")'; var tipo = 1; $.ajax({ url: url, data: { id:id, tipo:tipo } }); my…
-
4
votes2
answers392
viewsQ: Open View with Parameters
I have this Script: $('#Musico').change(function () { var id = $(Musico).val(); var url = '@Url.Action("Votar","Chamada")'; var tipo = 1; $(function ChamaVotar() { $.post(url, { id: id, tipo: tipo…
-
0
votes2
answers108
viewsQ: Taking Dropdown’s Name and ID
I have this Javascript that arrow the values to the Dropdown: $('#Estado').change(function () { var id = $(Estado).val(); $(function buscarCidade() { //alert(id); var url =…
javascriptasked Fabio Souza 1,859 -
1
votes3
answers1667
viewsA: Avoid duplicated list data
I did one inside another for: for (int i = 0; i < musicos.Count; i++) { for (int j = i + 1; j < musicos.Count; j++) { if (musicos[i].PessoaID == musicos[j].PessoaID) musicos.Remove(musico);…
-
1
votes3
answers1667
viewsQ: Avoid duplicated list data
I need a list of musicians without repetitions, however it is bringing duplicate values, according to the amount of songs that each Musician has, how do I to be brought only one Musician? public…
-
1
votes1
answer656
viewsQ: Fill in a Dropdown (Select)
I need to create a select In this pattern: <select id="Cidades"> <option></option> </select> Where the user will select its state, and then a jquery will be made that…
-
0
votes1
answer335
viewsQ: Creating a Dropdownlist
I’m using Asp.net-mvc-5, and wanted to know how to create a Dropdownlist without being in this pattern here: <div id="conteudoEscolha"> @Html.DropDownList("", null, htmlAttributes: new {…
-
0
votes1
answer35
viewsQ: Javascript event repeats itself in other Ids
I wanted to make a Javascript if repeated in other screen components, in this example I am passing I did a foreach and inside it I put my javascript. the intention is that it repeated itself 10…
-
0
votes1
answer115
viewsA: Jquery is returning Undefined to one of the generic properties I created
I have a Model that I use here to display alert for the user to confirm, maybe help you... Here would be the button code: <a class="btn ativa botaoicone2" data-target="#modal" data-toggle="modal"…
-
1
votes1
answer2059
viewsQ: Display alert when loading page
I’m using Asp.net-mvc and as far as I know the Onload event would work if I put in body, which is in ~Layout, but I need this alert to be displayed in a single page, because if I put in body will…
-
0
votes1
answer125
viewsA: How to send a special character to the view , Asp.net mvc?
Try to use # because the Backslash tells your framework that it is a text and not a character reserved by the language leaving so: "#contact" and just a note, you put a circumflex accent in your…
-
4
votes1
answer1201
viewsQ: How to update a Dropdownlist without refreshing the page
I have a State Dropdown, and a City Dropdown, and a zip code field, which is making use of the mail online API, when I put a zip code, my system checks whether the city already exists in the…
-
1
votes1
answer1179
viewsQ: Set Value in a @html.Dropdownlist
In an address registration form, I’d like to do the following. the guy types the zip code, then searches the zip code, and returns the data to fill in the Editorfor. So far so good, it’s working.…
-
1
votes2
answers996
viewsQ: Metodo Json - Return
I am developing a return of Zip Code through the post office API, the part that is in the controller is working, but I do not know if the return is correct, nor how to use in the view. If anyone can…
-
2
votes2
answers868
viewsQ: how to work with Partialview
I have the People Register, and I have the Address Register, which are in two separate classes, because the goal is that the user can have 2 or more addresses, as the delivery, and the collection.…
-
3
votes1
answer1159
viewsQ: There is no Viewdata item of type 'Ienumerable' that has the key
I’m having trouble with the Employee Position that is on a separate Table, when I try to create an employee selecting the position, he error... but if I assign the position in Controller (Ex:…
-
1
votes1
answer247
viewsQ: Editing content from Div
I have a index, that displays the data from my database, wanted to click on the div, open a modal, which allows changing that div. Code of view: <div style="float:left;…
-
-1
votes1
answer566
viewsQ: Date validation with Jquery
How to do date validation from Editorfor using jquery? wanted to check if the date typed by the user, and if the date he typed is greater than the current date, display a message to him stating the…
-
3
votes3
answers46057
viewsQ: Footer at the end of the document
I am trying to leave the footer at the end of the document, but it is at the end of the page I am viewing, thus hindering the usability of the system... Follow the footer: <div class="container…
-
0
votes1
answer298
viewsQ: Date validation with Dataannotation
I wanted to know if you have how to validate if the Date entered is higher or not than the current date using Annotation, or if I have to deal with the same controller. If you can, please provide an…
-
4
votes2
answers3152
viewsA: remove mask to save to database
I solved my problem like this: public ActionResult Create([Bind(Include = "PessoaID,Nome,Telefone,Celular,Whatsapp,Email,CPF,Tipo,RG,CTPS,DataNascimento,DataAdmissao,DataDemissao,Senha,CargoID")]…
-
1
votes2
answers3152
viewsQ: remove mask to save to database
I am using Maskmoney to create a mask in the field for the user to type. wanted to remove the mask, saving only the numbers and the comma (2 decimal places) in the bank. R$ 1.300.000,00 saving only…
-
1
votes2
answers477
viewsQ: View Ocutar Password using Editorfor
I’m using Labelfor, I wanted when clicking above to enter the password, displayed the characters, and when clicking outside was hidden, how could I do? <div class="form-group">…
-
2
votes1
answer52
viewsA: Assign HTML code to a Jquery Alert
already discovered, just put n to break line window.alert("Não existe produto cadastrado no sistema!\nPara continuar devemos cadastrar pelo menos um produto");
-
1
votes1
answer52
viewsQ: Assign HTML code to a Jquery Alert
I am using this Alert but wanted to insert a text break window.alert("Não existe produto cadastrado no sistema! Para continuar devemos cadastrar pelo menos um produto"); wanted for a line break…
-
1
votes3
answers1321
viewsQ: Onmouseover effect
I wanted to put two effect on the Onmouseover so that when you hover the mouse over it, the text would be of one color and the background with another color. I am using this code…
-
1
votes2
answers3847
viewsQ: Vertical line between Ivs
Is it possible to make a Vertical line between Divs? wanted to create a tab for the data. Below is an example of the code I am using: <div style="float:left; max-width:200px;max-height:200px;"…
-
1
votes1
answer685
viewsQ: Display balloon popup on a label
I would display a small message to the user, style those when passing the mouse, if I am not mistaken would be the attribute alt="my message" however I am using Asp.net-mvc-5 and I am finding it…
-
2
votes2
answers1051
viewsQ: Copy data from one field to another
My client, requested that I create 2 fields in the system, one as "Cellular" other as "Whatsapp" and that next to the Whatsapp field had a button to copy the value, if the number is the same,…
-
4
votes1
answer1510
viewsQ: Mask for monetary values
I wanted to create a mask for monetary values, where the person would type and enter the scores and separations of the decimals automatically. Ex: R$ 1 R$ ,11 R$ 1,10 R$ 11,00 R$ 110,00 R$ 1,110,00…
-
0
votes2
answers55
viewsA: How to know that called the screen
You can use this script <script> function goBack() { window.history.back() } </script> and call him on his button <input type="button" value="Back" onclick="goBack()"> Example:…
-
-3
votes2
answers67
viewsQ: Posting of a website
I would like to know, what is the average amount spent to publish an e-commerce site on the Internet, with databases, domain purchase and so on... and what exactly would I have to do to stay…
-
1
votes2
answers111
viewsA: Error When Generating Scaffold
I solved my problem including the .Oftype< Funcionario>() var pessoas = db.Pessoas.OfType<Funcionario>().Include(f => f.PessoaEndereco).Include(f => f.Tipo).Include(f =>…
-
2
votes2
answers111
viewsQ: Error When Generating Scaffold
I scaffolding generating the controller, and Index is showing an error in (f => f.Position) with this mistake: Cannot Convert lambda Expression to type 'string' because it is not a delegate the…
-
1
votes1
answer642
viewsQ: Confirmation of data Registrations E-mail Password
would like to know the best way to validate E-mail and password, to check if the user has typed the information correctly. Ex: Enter your e-mail address: Confirm your e-mail address: Enter your…
-
0
votes2
answers49
viewsA: Prevent Seed from duplicating data
With the help of @Tobymosque I was able to understand the workings of what I was doing, which was also right, but the data checker, was by ID and not by name. then I did the following: protected…
-
6
votes3
answers1227
viewsQ: Is there a Data Annotation that prevents data duplication in the Database?
How do I prevent data from being duplicated in the database using Data Annotation or via another validation?
-
1
votes1
answer496
viewsQ: Sending form to Pagseguro
I have this form @using (Html.BeginForm("PacoteAdd", "Pacote")) { <input type="hidden" name="email_cobranca" value="*****@hotmail.com" /> <input type="hidden" name="tipo" value="CBR" />…