Questions tagged as 'c#'

1
answer

index out of range c #

I'm trying to do a value assignment on a certain index of a String, however, I get the following error that I do not understand the reason:    System.ArgumentOutOfRangeException: 'The index was out of range. It should be non-negative an...
asked by 01.10.2017 / 18:47
1
answer

ASP.NET MVC - Windows Authentication - Browser Authentication Form

I'm developing an ASP.NET MVC application whose access permissions will be managed from the parameters defined for users in Active Directory (AD) . In order to search for this data from AD I have developed methods that send the UserName of...
asked by 27.10.2017 / 17:45
1
answer

How to make a sum of two arrays generating a third in C #?

I can not do it, I tried to use the FOR loop and also the IF to store in the array before summing, but my knowledge in C # is scarce. and the matrix is a 2x2.     
asked by 30.09.2017 / 15:03
1
answer

Deserialize Image in ASP.NET WebForm

I have a question about the deserialization of an image in webforms, I am working with Oracle Database which is my context and using the entity framework for image I am using BLOB, I was able to serialize and commit in bd, but not I can deserial...
asked by 24.11.2017 / 13:07
1
answer

When clicking the check button if the value of the textbox contains in a table column

How can I make a textbox check if it contains this value inside the table in the DataBase column when I click the button? I made this code, but I did not succeed: SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStri...
asked by 25.09.2017 / 13:35
1
answer

Standardize error messages in DataAnnotations in ViewModels classes

It is possible to standardize the error messages used in DataAnnotations, so that you do not have to pass a string like: [Required(ErrorMessage = "Este campo é obrigatório.")] But you can use more or less like this: string mensagem = "Est...
asked by 18.09.2017 / 13:44
1
answer

Error trying to change a user's role

I'm getting the following error when trying to change the role of a user:    Application Server Error '/'. UserId não encontrada. Descrição: Ocorreu uma exceção sem tratamento durante a execução da atual solicitação da Web. Examine o rastre...
asked by 10.10.2017 / 10:24
1
answer

Eaves view parameter to action

I have a view that list my users, it's basically in the default generated by asp.net mvc with entity, the data is in a table, and inside this table I have one: @Html.ActionLink("Aprovar cadastro", "Aprovar") And I have within the controller...
asked by 08.10.2017 / 03:59
1
answer

Send appointment email for Google Calendar appointment

I have a C # ASP.NET MVC application, in which the user can schedule an appointment. In this application he chooses a text for the appointment, a Date to happen and also chooses, as soon as he wants to be warned of the appointment, that generate...
asked by 16.10.2017 / 15:47
1
answer

Pass an object to Modal

I have a Foreach in a table, I need as soon as the user clicks a line, open a modal with the data of the object contained in that row. Foreach: @foreach (PedidoModel pedido in @Model.Entidades) {...
asked by 08.09.2017 / 15:43