Posts by sir_ask • 404 points
27 posts
-
1
votes3
answers923
viewsA: window.showModalDialog does not work on Google Chrome, is there anything equivalent?
It seems that Chrome has disabled this function.. have in this post the explanations and some ideas to get around the situation…
-
1
votes2
answers1790
viewsA: Button to open/close content
ex: https://plnkr.co/edit/lHh7KVQBrGzMFFbre5z1?p=preview Add the Divs you want to show the same class.. <div class="to_show"> then you can use jquery to add a listenner to the button and use…
-
0
votes1
answer880
viewsA: Query all sql tables
Good, look at this example: SELECT * FROM dbo.YourStudentTable FOR XML PATH('Student'), ROOT ('Students') drawn from…
-
1
votes2
answers91
viewsA: Checking whether data persisted successfully
With a Try/catch, in case the Add or savechanges fails an exception is released. public bool IncluirRegistro(Pessoa tEntEF) { try{ db.Pessoa.Add(tEntEF); int DadosSalvos = db.SaveChanges(); return…
-
1
votes3
answers146
viewsA: How to disable the login button when sending the form to the user not to make several requests?
Using the above example, just see if the form is valid $( "#myform" ).submit(function( event ) { console.log('desabilita'); if ($("#myform").valid()) { $("#botao").prop("disabled", true); }…
-
1
votes1
answer116
viewsA: Datatable Jquery Print Specific Elements
I think this is what you want: https://jsfiddle.net/ms85e7zo/3/ $(document).ready(function() { $('#example').DataTable( { dom: 'Bfrtip', buttons: [ { extend: 'print', messageTop:…
-
0
votes2
answers812
viewsA: but this Dictionary requires a model item of type 'System.Collections.Generic.Ienumerable`1[Webapplication4.Models.modelExemplo]
As I said before, I think what you want to do is pass a list of strings, don’t you? within your model object, create the list and then scroll through that list.. Now a note: if your goal is simply…
-
1
votes1
answer85
viewsA: Check for changes in an html table
My guess is you’ll have to read the chart into some variable. You do a foreach for each line, and you keep the name and state in a global variable, when you re-compare and update to that variable.…
-
0
votes2
answers121
viewsA: How to screen a serialized object?
public JsonResult ObtemPorId(int id) { var evento = Db.Eventos.FirstOrDefault(e => e.ID == id); return Json(result, JsonRequestBehavior.AllowGet); } Just try this, I think it should work.…
-
1
votes3
answers176
viewsA: Tooltip in a Listview in c#
from what I’ve seen, you can also directly use the properties of the Listview class example taken from…
-
0
votes2
answers60
viewsA: Generate Quence for Field
https://stackoverflow.com/questions/8990319/have-a-custom-setter-on-property-for-ef-code-first-model-entity code taken from this link. private string documentoNumero; public string DocumentoNumero {…
-
2
votes2
answers8291
viewsA: create a file with C# content and save to a folder on the computer
https://msdn.microsoft.com/pt-br/library/system.io.file.createtext(v=vs.110). aspx string path = @"c:\temp\MyTest.txt"; if (!File.Exists(path)) { // Create a file to write to. using (StreamWriter sw…
-
-1
votes1
answer430
viewsA: Retrieve Ienumerable values from View
Try changing the foeach by a traditional for @for (int i = 0; i != Model.ListaItemTabelaPreco.Count(); ++i) { @Html.Raw(list.Nome) @Html.TextBoxFor(m =>…
-
0
votes2
answers306
viewsA: Split String Html
Well, maybe this hiccup is a little forced, but it works.. string split = "<div class=\'page\'>"; List<string> div = System.Text.RegularExpressions.Regex.Split(HTMLemString, split,…
-
0
votes1
answer427
viewsA: Format String after it is converted from HTML
https://stackoverflow.com/questions/2822843/itextsharp-html-to-pdf from what I saw there seems to be a bug with that.. there’s a solution in that answer: Document document = new Document(); try {…
-
0
votes1
answer45
viewsA: Delete row from grid (BD) website C#
https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdeleting(v=vs.110). aspx protected void Grid_RowDeleting(object sender, GridViewDeleteEventArgs e) { } Change the…
-
2
votes1
answer82
viewsA: Download View instead of displaying it
public string RenderRazorViewToString(string viewName, object model) { ViewData.Model = model; using (var sw = new StringWriter()) { var viewResult =…
-
3
votes2
answers479
views -
0
votes3
answers119
viewsA: create java script functions after rendering all partial views
where do the js include?! make sure you are not doing includes after rendering the partials, and inside the partials try to use for example a jquery that is not yet loaded. if this is the case, load…
-
0
votes2
answers750
viewsA: Read a BLOB corresponding to an image
Here you have a possible answer, the function returns the image in bitmap 1 https://stackoverflow.com/questions/8257941/retrieve-longblob-from-mysql-in-c-sharp Edit: you can also convert to an array…
-
1
votes1
answer986
viewsA: How to join two different lists using LINQ and Where?
I think if I understand your question correctly what you want is this: List<Relacionamento> result = (from relacionamento in ListaRelacionamentos join procedimento in ListaProcedimento on…
-
0
votes2
answers501
viewsA: Have two menus and when minimize get only 1 containing both
I agree with everything Sérgio said.. but in case you want to go with that layout.. this implies "duplicate code" <html lang="en"> <head> <title>Bootstrap Case</title>…
twitter-bootstrapanswered sir_ask 404 -
3
votes1
answer125
viewsA: It is possible to make Dropdownlist "readonly" equal to Textfield
I think what you want is not possible. Going back a bit to the comment that I had already made why not simply show the value that the client selected? Add a field in model that returns to the View…
-
0
votes3
answers249
viewsA: Disable button in modal window using Jquery
Edited: $('#idDivModal4 #btn-enviar-lembrete').click(function() { $(this).prop("disabled",true); $(this).prop("value","Aguarde.."); }); or as your code $('#idDivModal4').on('click',…
-
1
votes1
answer294
viewsA: Create thumbnail without stretching/shrinking the image in c#
would say to do a Crop.. here at this link below (code) shows how. https://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c Rectangle cropRect = new Rectangle(...); Bitmap src =…
-
1
votes1
answer97
viewsA: MVC 5 Ajax.Actionlink returns result, but does not render in DOM
I don’t know what you did.. but Express install jQuery.Unobtrusive.Ajax search in Nuget manager: "Microsoft.jQuery.Unobtrusive.Ajax" searches for the latest version.
-
0
votes3
answers82
viewsA: Error while traversing vector
my answer is based on error only.. I don’t know if you had any other doubts or not.. you also have an alternative to a.. foreach traversing a list/array namespace vetoor { class Program { static…