Questions tagged as 'c#'

1
answer

Pass properties from the ViewModel to the Controller

I put my table inside a BeginForm passing my controller and my action, but when I submit submit the fields are NULL in the controller, I think it is not passing the ViewModel properties. @model Dlieve.BackOffice.Areas.BackOffice.Models....
asked by 07.02.2017 / 17:04
1
answer

Error with Android Style

I'm not able to compile my project, I get the following error <type> attribute is required for <item> Here'smystyle.xml<?xmlversion="1.0" encoding="utf-8" ?> <resources> <style name="MyTheme" parent="MyTheme.Base...
asked by 25.05.2017 / 03:09
1
answer

string was not recognized as a valid datetime

Hello. This problem is only occurring when I place the site on iis. I have tried several solutions, but I can not solve it. Below the code snippet where the problem occurs: public DataTable SelecionaConsulta(string dtaIni,string dtaFim) { re...
asked by 24.05.2017 / 20:49
1
answer

Create ActionFilter for login "Anonymous"

I searched the internet but did not find the answer to what I wanted. I have the simple code below that checks whether the user is authenticated or not in my ActionFilter public class FiltroLogin : ActionFilterAttribute { public override v...
asked by 29.05.2017 / 00:48
1
answer

windows service c # - error 1053

Create a Windows service C # application, I use a setup project to do the service installation on windows, when I try to start the service on windows the following error occurs: error 1053 the service did not respond to the start or control r...
asked by 01.02.2017 / 12:44
2
answers

Disable button during javascript processing c #

I have the following asp button: <asp:Button ID="btnOk" runat="server" AutoPostBack="true" CausesValidation="true" ClientIDMode="Static" Text="Ok" Width="80px" OnClick="btnOk_Click" OnClientClick="btnOk_OnClick();return true;" class="dxbBu...
asked by 30.01.2017 / 16:49
1
answer

Vertically center a label on the StackPanel

I'm trying to center vertically a label within a StackPanel . I have already defined the VerticalAlignment="Center" attribute but noticed no difference in vertical positioning, as can be seen in the image below. That is, the label...
asked by 18.12.2016 / 18:16
1
answer

Problem with accentuation when executing python script straight from C #

I'm using this to run the code: processo.StartInfo = new System.Diagnostics.ProcessStartInfo { FileName = @"\Python27\python.exe", Arguments = arquivoResposta, UseShellExecute = false, CreateNoWindow = true, WindowStyle = S...
asked by 24.12.2016 / 18:41
1
answer

Comparison of database dates with system date

Hello I need to compare the month of registration of information present in a database table with the current month provided by the system. In the database I enter the number for the month in a column. For example: On 16/12/2016 I regis...
asked by 17.12.2016 / 17:59
1
answer

Query with Linq to Entities in many-to-many relationship

I have the following tables in a database: The TeacherCourses table joins the many-to-many relationship between the Courses and Teachers tables. I have been trying for a long time to make a query with Linq to Entities that returns all...
asked by 23.12.2016 / 01:50