Posts by PauloHDSousa • 3,509 points
159 posts
-
0
votes1
answer51
viewsA: Method returning object name in Entity
You are trying to give a . Tostring() in Object. Try to do it this way ARQUIVOdal.GetArquivoVersao.NOME_DA_PROPRIEDADE_QUE_QUER_EXIBIR.ToString();
-
3
votes1
answer54
viewsA: Radiobuttonlist does not accept if Selectedindx
What could be wrong with that statement? In my opinion nothing. @pnet In your if you are assigning a value to Selectedindex =, you must use == for boolean checks. if(rblAprovar.SelectedIndex == -1)…
c#answered PauloHDSousa 3,509 -
2
votes1
answer57
viewsA: Parameter in URL is coming null
Mount the redirect url this way if (hdfCdTipoStatus.Value == "2") Response.Redirect("/frmANACadastroBens.aspx?CdProcesso=" + RetornaProcessoUltimaAnalise(int.Parse(hdfCdUsuario.Value)), false);…
c#answered PauloHDSousa 3,509 -
0
votes2
answers1201
viewsA: Identify USB stick
I gave a search and found this code, it will play on variable drivers, all the removable type drivers that are have been connected. var drives = DriveInfo.GetDrives() .Where(drive =>…
-
1
votes2
answers193
viewsA: Sorting Gridview event, do you doubt?
I noticed that when it is to sort down, you do return the list to another gridview, I think the correct is to add the list in gridview gvdNomeClients The Code below should work. protected void…
-
-1
votes4
answers4566
viewsA: How do I update my data in the table using the Entityframework?
Assuming the CODIGO column is the primary key of the Contactadopessoas table.Try to do so var contactado = ContactadoRepositorio.ObterListaContactadoPorCodigo(procedimentoVM.CodContactadoPessoa);…
-
1
votes2
answers486
viewsA: Asp.net mvc Bad Request
There are several ways to do this, you can in the action itself identify the error and redirect, you can also use global.asx but I recommend you use web.config to do this. <configuration>…
-
4
votes1
answer316
viewsA: Touch events Swipe, swipeRight and Left do not work on android 4.4.2
Looks like it’s really a bug with the Android version. For now we can only wait. https://github.com/driftyco/ionic/issues/1729 https://github.com/madrobby/zepto/issues/823…
-
1
votes1
answer338
viewsA: Shortcut on clickonce User Startup
Hello, Have these strategies used here https://stackoverflow.com/questions/401816/how-can-i-make-a-click-once-deployed-app-run-at-startup…
-
2
votes2
answers13571
viewsA: navigate through the child elements
You can use the Each() jquery http://api.jquery.com/each/ <ul id="column1"> <li rel="1">Info</li> <li rel="2">Info</li> <li rel="3">Info</li> </ul>…
jqueryanswered PauloHDSousa 3,509 -
1
votes2
answers465
viewsA: What criteria do I use when choosing which Apis to download?
You have to download the ones you need, I recommend downloading the 2.3.3 And all of 4.4 up. Do not download the "EXAMPLES", at least I do not consider it necessary. In short, download as you see…
-
2
votes1
answer153
viewsA: Return data from a table in Web.config
Hello, Just put 4 text fields for the technician to inform SERVER + BANK + USER + PASSWORD And with the contents of the text fill var section =…
asp.net-mvcanswered PauloHDSousa 3,509 -
3
votes2
answers552
viewsA: Dividing 1/2 in C#
Basically what happens is that the last division you get before it is == 0 has a number of decimal places that fit in one decimal. Thus the value that should be for it to become != 0 does not fit in…
-
4
votes1
answer827
viewsA: Timeout while Getting a Connection from pool
Hello, Add to your connection string and see if it worked. Pooling=false; I would guess that there are many open connections, but I looked that Voce da um Ispose(); so it shouldn’t be that.…
-
1
votes3
answers73
viewsA: Remove event handler after 3 click
Place . on() inside Jquery Ready. (function($) { $(function() { $("#div3").on("click", eventCon); }); })(jQuery);
-
1
votes2
answers710
viewsA: Server Too Busy
Hello, Try to follow these steps Open your application, go to Properties --> Web Tab -> Servers --> And bookmark (Use Local IIS Web Server) and click Create Virtual Directory. Run your…
-
4
votes4
answers1730
viewsA: How to display "Update your Browser" warning when it does not support HTML5?
Hello, as our friend @Ricardo Peres said, just use the http://modernizr.com/ Put it on your page. <script src="modernizr.min.js"></script> And make if (Modernizr.canvas) { // Suporta…
-
1
votes2
answers2053
viewsA: Pass parameter without specifying the type of variable to receive in the function
You can do it like this. public String getVarType(String var){ return "String"; } public String getVarType(ArrayList var){ return "ArrayList"; }
javaanswered PauloHDSousa 3,509 -
3
votes2
answers761
viewsA: Save data to a Viewbag
Hello, On the controller do public ActionResult Index(){ dynamic model = new System.Dynamic.ExpandoObject(); model.Lista = usuarioRepository.Lista.Where(u => u.sLogin ==…
asp.net-mvcanswered PauloHDSousa 3,509 -
4
votes1
answer63
viewsA: How to display the version of my website on all pages?
I recommend you put on web.config a property with the site version number. And display it on MASTER.PAGE. On the web.config <appSettings> <add key="versaoSITE" value="2.0"/>…
-
-2
votes4
answers964
viewsA: How to do advanced data filtering across multiple fields?
I believe this is it, I will answer in PURE SQL SELECT * FROM nomeDaTable WHERE USER_ID = 29 OR USER_GROUP = "ADMIN" OR USER_LEVEL = 1 OR USER_TYPE = 3 OR USER_ROLE = 10 OR (USER_ID = "" &&…
-
2
votes1
answer106
viewsA: Configure visual studio 2010 to open pages . aspx always with source
Hello, Just set up in visual studio. Go to TOOLS > OPTIONS and do the same in the image Source: http://www.wiseowl.co.uk/blog/s153/visual-studio-html-view.htm…
-
2
votes1
answer526
viewsA: Doubt about the use of multiple user control on the same page
Yes, in order to use the page you must register the control. There’s an easier way to do this than going page to page, just register on the web.config, for example configuration>…
-
2
votes1
answer40
viewsA: What is Text= Resources from a dxe button?
Hello, you are using Resources to define the text. This is usually used to create applications with more than one language Here are articles that can help you.…
-
11
votes3
answers546
viewsQ: Simulate placeholder in IE8
I was reading the documentation here and it seems that the attribute placeholder does not work in IE8. Would have some way to simulate the placeholder that you use? Example of HTML not working in…
-
2
votes1
answer557
viewsA: How to prevent browser from displaying previous alert and resend information?
you can check if it is a postback, if positive you can redirect to another page if(IsPostBack) { Response.Redirect("/"); } else { //Salva dados. } Take a look :…
-
2
votes1
answer703
viewsA: Validate if one of the fields has been completed
Hello, just do it this way $("#form").validate({ rules: { Telefone: { require_from_group: [1, ".camposFiltro"] }, Celular: { require_from_group: [1, ".camposFiltro"] }, }); And in HTML <input…
-
-2
votes3
answers619
viewsA: Rotation on certain screens
Hello, on Appdelegate. h add @property (nonatomic , assign) bool blockRotation; and in Appdelegate. m -(NSUInteger)application:(UIApplication *)application…
-
1
votes3
answers1047
viewsA: Do not allow typing space in maskedTextBox
Another mode using the Keypress event, why? The Keypress Event will fire while the user is pressing the key, unlike what happens in Keydown. private void maskedTextBox1_KeyPress(object sender,…
-
1
votes2
answers3318
viewsA: Take the directory route
Instead of using Openfiledialog use control folderBrowserDialog Source http://msdn.microsoft.com/en-us/library/aa984305%28v=vs.71%29.aspx…
c#answered PauloHDSousa 3,509 -
1
votes2
answers45
viewsA: Assign ownership of five out of five elements
Hello, just do as below you will get what you want. .galeria li:nth-child(5n) { margin-right: 0!important; } For IE8, you can use JQUERY $('.galeria li:nth-child(5n)').addClass('semMargem');…
cssanswered PauloHDSousa 3,509 -
0
votes4
answers1452
viewsA: Is there an event that captures mundanes the size of an HTML element?
Hello, You can also find out when the size changes with CSS3. @media only screen and (min-width: 4800px) and (max-width: 5000px) { background-color:red; } @media only screen and (max-width: 4800px)…
-
2
votes2
answers290
viewsA: How to insert Entities, related to other existing ones, into the Entityframework?
Do so EntidadeA a = new EntidadeA(); EntidadeB b = new EntidadeB(); b.Id = 5;// id de entidade existente no banco a.EntidadeB = b; context.EntidadeB.Attach(a.EntidadeB); context.EntidadesA.Add(a);…
-
1
votes2
answers47
viewsA: Set limit, css animations
Just add overflow: hidden; in class . menu { }
-
1
votes1
answer65
viewsA: Android and the layouts
Do you want to know if you can make a screen without at least the layout XML? if that is the answer NO! You can create an empty XML and add them via code, but at least one layout . xml should exist.…
androidanswered PauloHDSousa 3,509 -
2
votes1
answer115
viewsA: Knockoutjs does not work
Place ko.applyBindings at the bottom of the page or inside the $(Function(){ }); Jquery. In your case, do it this way. <!DOCTYPE html> <html> <head> <script…
-
0
votes2
answers665
viewsA: Datagridview with columns of different tables of a Dataset
You can use Reportviewer to generate the report http://paulohdsousa.blogspot.com.br/2012/01/relatorios-com-reportviewer-e-linq-c.html…
-
1
votes1
answer101
viewsA: Dynamic column with value appearing wrong in Webgrid
The Value always appears OUT because it falls in the if ternary Else Format = (item) => (((List<string>)item.attrValues).Count < local) ? @item.attrValues[local] : "SEMPRE ESTÁ CAINDO…
-
1
votes3
answers71
viewsA: .length locks all the code
We’re missing a ) at the end of the code Do so $(document).ready(function() { . . . if ( $("#estoulogado").length ) { . . . } . . . });…
-
2
votes3
answers220
viewsA: Select "Cancel" in Alert by default
You can use this plugin http://trentrichardson.com/Impromptu/ And make a code like that. $.prompt('Example 4',{ buttons: { Ok: true, Cancel: false }, focus: 1 }); Source…
javascriptanswered PauloHDSousa 3,509 -
0
votes3
answers1705
viewsA: Fileupload without refresh on the page?
The way I always recommend is using ajaxuploader, it is free and very easy to use. note: not microsoft ajax link to the project http://ajaxuploader.com/default.htm how to implement…
-
4
votes6
answers1117
viewsA: Algorithm against Brute-force
Warning: I’m not an expert on security or this kind of attack Mode 1 One mode that I use and that you can use is to block the LOGIN/EMAIL after you have missed the password 5 times. LOGIN/EMAIL is…
-
1
votes3
answers1631
viewsA: Concurrency control in database insertion
You can use the lock of C#, basically it blocks that someone else accesses the code that is "LOCKADO" while someone is already there. object lockObject = new object(); public void DemoLock() { lock…
-
0
votes2
answers624
viewsA: How to apply jQuery Validate rules to multiple fields at once?
Add class="required" In the fields you want to become mandatory. And in javascript do $(function () { $.validator.setValidator('idDoSeuForm'); });…
-
0
votes4
answers1634
viewsA: Scroll with Jquery
You can use ANCHOR. Link to be clicked <a href="#vemPraCa">Clique aqui para dar Scroll</a> Where the Scroll goes <a name="vemPraCa"></a>…
-
3
votes3
answers3330
viewsA: Grab ID immediately after insertion
Just do as the code below Pessoa pessoa = new Pessoa(); pessoa.nome = "Paulo"; context.AddObject(pessoa); context.SaveChanges(); int id = pessoa.Id; After you call Savechanges(); the Entity already…
-
1
votes1
answer851
viewsA: Updating edmx file is not working
Remove the Designer tables and add again, this should solve. I often have problems when using update p/ update some new field in an existing table in . edmx
-
5
votes5
answers2270
viewsA: Using unused affect performance?
This does not affect the performance of the program, it is the same idea of redundant comments in the codes. It makes no difference to the compiler but can disturb the programmer. The most that can…
-
3
votes2
answers567
viewsA: Java server disconnects idle users after 5 minutes
Just do this Socket socket = new Socket(); socket.connect(new InetSocketAddress(ipAddress, port), TempoParaTimeoutEmMilissegundos); Or socket.setSoTimeout(timeout) Sources…
-
1
votes4
answers4106
viewsA: Instantiate class as another class’s Property
You will have to instantiate the Person class, you can do this on GET. public class Pessoa { public int idPessoa { get; set; } public string nome { get; set; } } public class PessoaFisica { private…