Questions tagged as 'c#'

1
answer

How to remove the handling of a DateTimePicker

I use the DateTimerPicker component to use the calendar and set the date, but I would like to remove the component's treatments because it makes it difficult to use the user, I already gave an optimized one,     
asked by 03.03.2015 / 18:19
2
answers

Pass parameters via jquery to my model

I always passed paramatros to my controller like this: url: '/Minha_Controller/Minha_Função', .... Now I need to pass parameters directly to My Model and I do not know how to do it. I have this model: MontaArvoreAcao.cs. This does not work,...
asked by 29.09.2014 / 21:32
1
answer

Try Catch influences performance? [duplicate]

Use% of% influence on performance? in memory usage? Would it be a problem if all the actions you do have error handling? try { clienteRepository.Salvar(entity); } catch (Exception e) { emailService.EnviaErro(e); }    ...
asked by 24.10.2014 / 13:45
1
answer

Assigning value to variable of type HiddenField is giving error

I have this statement: HiddenField vhdfCdTipoUsuario = null; I have this assignment: vhdfCdTipoUsuario = (HiddenField)e.Item.FindControl("hdfCdTipoUsuario"); If I do this, it gives this error: if ((vhdfCdTipoUsuario.Value != Session[...
asked by 24.11.2014 / 14:49
1
answer

Select file without using OpenFileDialog

Well, last week I asked this question: Get path from desktop At this moment I wanted the program in Load, the OpenFileDialog method is used, but without the user having to select the file you want, since the file to be opened in the code...
asked by 25.05.2015 / 12:58
1
answer

Do not always use the attached button

IhaveaquestionmyprogramconsistsofsendingemailwithattachmentsbutsometimeswhenIdonotwanttosendanemailwithattachmentsgivemeanerror Can anyone help? I can send email with attachments without problems but no attachments do not work code:...
asked by 16.05.2015 / 16:29
3
answers

How to prevent a System.NullReferenceException inside an if [closed]

I'm developing a web application where a photographer does upload of an image. After copying the image, I'm going to scan all the metadata of the image in order to capture some information from the directories (Exif, IPTC, XMP, JFIF, PNG, BM...
asked by 20.07.2017 / 20:28
2
answers

Error 1 No overload for method 'MethodHerdado' takes 1 arguments

Error: Error 1 No overload for method 'MétodoHerdado ' takes 1 arguments Code: public void restauraRegistro(DataGridViewRow linha) { try { string codigo = String.Empty; //verifica se...
asked by 10.08.2018 / 15:45
1
answer

How to return two staked classes in return [duplicate]

Controller public ActionResult Sobre() { ViewBag.Message = ""; SobreEntidade sobreE = new SobreEntidade(); Sobre sobrePaginas = new Sobre(); sobrePaginas = sobreE.ConsultaEmpresas(); Sobre sobrePaginas2 = new Sobre...
asked by 11.09.2018 / 15:21
2
answers

Doubt with relationships N to N or 1 to N

Given the following scenario. I have 1 user table and 1 login table, for example. I need to create my domain class that maps these DB entities. In the login table, I get the user ID. What does this relationship look like in my model? [Table("U...
asked by 16.08.2017 / 14:35