Questions tagged as 'c#'

3
answers

Select the Controller name using JavaScript

I have the following code and would like to add class="current" to <li></li> according to the controller I'm accessing. I want to do this to make the item stand out. <ul class="nav"> <!-- Main menu --...
asked by 24.11.2016 / 09:46
2
answers

Ping on server with C #

Is there any .NET class with ping functionality? I have the IP of the server in an attribute of type String and would like to ping the server to see if it is online or offline. Does anyone know?     
asked by 20.09.2016 / 17:40
1
answer

Displaying welcome message on navbar!

I'm doing an application in MVC asp.net . When the user logs in, I would like them to display the welcome message with the user name, however you are bringing the email, how do I change it? My action looks like this: @Html.ActionLink("Olá...
asked by 23.01.2018 / 19:34
1
answer

Is it possible to apply CSS style in the method of sending e-mail?

I have the following method that sends a password recovery email to the user. I would like to know if it is possible to apply some type of CSS formatting in it, in order to make the email sent more attractive. Email Received: Code:publicv...
asked by 06.03.2018 / 15:29
1
answer

error Migrations C # MVC

I created a Financial Controller, but when I click on the menu to list it returns the error:    Invalid object name 'dbo.Movimentacaos'. Why did you get this name? It was meant to be Movimentacoes . PS: I already added in my cont...
asked by 15.06.2016 / 05:00
2
answers

Add AND and OR to Where de list

I have a list in C# and the search code is currently like this: filter = lst.Where(s => s.Contains(num.Text) ).Take(3).ToList(); The lst list is based on a list of phone numbers and contact names, for example: 123456789$nome1 9...
asked by 13.06.2016 / 20:53
1
answer

How to access properties with "." in the name in a dynamic object

I have the following JSON object: { "odata.metadata":"httpXXXXX", "odata.count":1443, "value":[ { "codigo" : 1 , "nome" : "ABS"} ] } and create an object like this: dynamic categorias = JsonConvert.DeserializeObject(js...
asked by 09.06.2017 / 15:01
1
answer

Question: Search with DropDownlist mvc 4 razor asp.net C # sql Server [closed]

I am having difficulty popping the dropdown with sql server, because it comes repeated sql item ... ex: when I select the cities it comes with repeated cities and so on, and I can not direct to the search page. follow the code Controller Home...
asked by 12.09.2016 / 21:09
1
answer

Access row and column specific of a C # list [closed]

How do I make a multidimensional list, and can I add elements like this: List<List<String>> listaMultidimensional = new List<List<string>>(); listaMultidimensional[0][0].Add ("maca"); listaMultidimensional[0][1].Add ("...
asked by 17.10.2016 / 05:06
1
answer

Doubt with join between two classes

I have the Classes: class Procedimento { public string CodProcedimento { get; set; } public string NomeProcedimento { get; set; } public string TpSexo { get; set; } public int IdadeMinima { get; set; }...
asked by 30.01.2017 / 20:02