Posts by Thiago Araújo • 552 points
26 posts
-
1
votes2
answers655
viewsA: Label with input range value
Function jQuery: <script> $('input[type=range]').on('input', function () { $(this).trigger('change'); $("#brightnesslabel").html($(this).val()); }); </script> If you want to take a…
-
1
votes1
answer29
viewsA: Getting value inserted in Asp text field. Net
I believe you will need to use a Databound event to retrieve the values, similar to this. protected void gvTeste_ItemDataBound(object sender, RepeaterItemEventArgs e) { var variavel =…
-
0
votes1
answer558
viewsA: List of all files that are within the Resource.Raw folder
Something like this could solve: var files = Directory.GetFiles("android.resource://" + PackageName + "/", "*.*") .Where(s => s.EndsWith(".mp4")); var caminho = new List<string>(); foreach…
-
3
votes2
answers543
viewsQ: How to find out if I need to rotate the image
I am implementing some features to perform OCR in images and so far everything is going very well. The problem is; the OCR works well if the image is in the correct rotation, if it is upside down or…
-
3
votes1
answer1478
viewsA: @Html.Dropdownlistfor how to set the default value
You can do it with Dropdownlist, which is also a cool alternative: In Controller, if you already want to set the default value is like this: ViewBag.equiColaborador = new…
-
2
votes2
answers724
viewsA: Razor in javascript file
Create a. js file and enter your code: $.ajax({ type: "POST", url: "Action", success: function () { //Seu código aqui ... } }); And then in your View Layout, you instance: @section scripts{…
-
1
votes1
answer249
viewsA: Search Data-id and Remove from Database
I changed your function, and I entered the ajax calling part. <?php foreach($fotos_ingresso as $valor){ ?> <div id="fotos-listagem-imagem"> <a href="javascript:void(0);"…
-
1
votes1
answer285
viewsA: Migrating from Webforms to MVC, what is the best way to store and manipulate a logged-in user’s data?
Responding simply based on the experience I’ve had. I made a class/filter that takes care of the logged in users, besides validating whether or not it can access such class, this based on "roles"…
-
1
votes2
answers1675
viewsA: Validating Login
If you report that the user or password specifically is incorrect, it is easy for someone malicious to try to hack into your application. I made some changes in order to reduce code. private void…
-
1
votes0
answers45
viewsQ: Read response in json via a fetch with service-worker
I am implementing a web notification system, using service-worker and other components, in Asp.net MVC. 1° I already have my worker registered and started on the system. 2° I can display…
-
1
votes2
answers310
viewsA: Dynamically mount Timeline in html on page . aspx
You can use Repeater for this: <ul class="timeline"> <asp:Repeater runat="server" ID="RptTime"> <ItemTemplate> <li class="time-label"> <span class="bg-red"><%#…
-
1
votes1
answer439
viewsA: Datatables - Default Sort
You can do it here: $(document).ready(function() { $('#example').DataTable( { order: [[ 3, 'desc' ]] } ); } ); where order: [[ 3, 'desc' ]] 3 means the number of your column and down means that it…
-
0
votes1
answer375
viewsA: Clear Modal with Button Without Saving Data
You can make jquery do this job for you if you don’t want to work on the Behind code. Place in the fields to which you want to clear some class for jquery to identify later, e.g.: CssClass="limpar".…
-
2
votes1
answer526
viewsA: Validate textbox with date
A very simple way for you to do this validation is with Jquery Mask. Download the plugin here https://igorescobar.github.io/jQuery-Mask-Plugin/ and in your code you will do the following:…
-
0
votes1
answer26
viewsA: Send Email Configured Email
You already have the function to send the email and in this function there is the correct message field?! what you need to do is say that email is an html. mail.IsBodyHtml = true; Then you need to…
-
0
votes1
answer763
viewsA: Logging in via C#
You can implement your solution using Selenium Webdriver, which has the focus on performing automated tests, however, as you want to perform the action of open browser and go clicking on a few…
-
3
votes3
answers393
viewsA: Sort children in consultation Linq
The answer is this: public Grid GetByOrderGridData(long id) { var query = from c in context.Set<Grid>() where c.Id == id orderby c.Id select c; return query.FirstOrDefault(); } If you want to…
-
0
votes2
answers456
viewsQ: Change the name of the pdf file to hash and then manage to undo the name to read again
I’m doing a feature on a system where; Any sector will upload an important file, this file contains sensitive information linked to each employee of the company. Each employee can open his own file,…
-
1
votes2
answers180
viewsA: ASP.net Javascript does not recognize Textarea if it has a runat="server" tag
On Asp.net when you use runat="server" will mean that you will manipulate the component on the server side and not on the client side (browser). When this occurs, your id who was objetivos_projeto…
-
1
votes1
answer285
viewsQ: Migrating from Webforms to MVC, what is the best way to store and manipulate a logged-in user’s data?
For years I worked with c# systems in Webforms, however, by necessity I migrated my development goal to mobile applications with Xamarin and standards MVVM. Now in parallel I am developing again WEB…
-
0
votes2
answers600
viewsA: Recover image in SQL SERVER and put in a REPEATER list
If you have saved in your bank the image path, just add the component Image in your Repeater: <td> <asp:Image ID="Image1" height="32" width="32" runat="server" ImageUrl='<%#…
-
1
votes1
answer251
viewsA: RPT file conversion to PDF c#
If the report you want in pdf will be generated in rpt, then you need to create the report before turning it into pdf, something like this: public void GerarRelatorio(){ Warning[] warnings; string[]…
-
1
votes1
answer109
viewsA: Xamarin Visual Studio
I was having many problems with android emulator on Mac, I downloaded then the plugin Genymotion and finally solved the problems regarding android. Nowadays I’m using both windows (at work) and at…
-
0
votes2
answers32
viewsA: Macagent Xamarin
On Mac you will need the Xcode and Visual Studio or Xamarin Studio, together with all SDK (usually downloaded together with Xamarin studio or visual studio). Also don’t forget to release Remote…
-
1
votes2
answers203
viewsA: Communication between Code Behind and Viewmodel Xamarin
I run this operation in a simpler way. You can use the plugin Settingsplugin (also found in nuget packages in Visual Studio) and simply "set" the value in a variable and then rescue it from wherever…
-
2
votes1
answer567
viewsA: Increase the "text box" of the <Editor /> in Xamarin Forms
You can use the HeightRequest in the Editor. A nice size for him to stay is to use HeightRequest="150".