Questions tagged as 'c#'

2
answers

Show values of a List in Labels

I want to show the values that I get from a query, I keep them in a 'List' but it does not show me anything: private void getValues2() { List<string> list2 = new List<string>(); cn.Open(); SqlCommand cmd = new SqlComman...
asked by 14.06.2017 / 20:11
1
answer

Sort columns of a GridView in ASP.NET C #

I want to sort the columns of a GridView in ASP.NET, I am consuming an external service that throws me and the results and that result I have put it in a grid, that is to say in a GridView but what I want is to order by columns. This...
asked by 14.06.2017 / 15:24
1
answer

Path not found in my @ Html.Action

I have an action child, which I use to invoke a view in a layout, but when using the @ HTML.Action , it tells me that the controller that happened to it has not been found. <li class="dropdown"> <a href="#"...
asked by 26.06.2017 / 18:04
2
answers

Use object instantiated in a class in a different one

Good morning everyone! Can I use methods or properties of an object that I have instantiated in a namespace / class in another class that is inside another namespace?     
asked by 15.06.2017 / 17:43
1
answer

Validate existence of an email with C #

I have this function in which I intend to validate the existence of an email. But I mark an error in the creation of the instance of the function: static void Main(string[] args) { bool bandera = checkDNS("[email protected]", "MX"); } pub...
asked by 15.06.2017 / 13:59
1
answer

Retrieve the value of an ASP.Net text box [duplicated]

I have a textbox with id TextBox and I have a JavaScript function function prueba() { var hotel = document.getElementById("titulo").innerHTML; $('#MainContent_TextBox1').val(hotel); } Now in the codebehind I wa...
asked by 14.06.2017 / 23:02
1
answer

Error running a Foreach ASP.NET MVC5

Hello Stack colleagues, I currently want to run some data through a cycle foreach but I have a problem always throws me the following error    Parser Error       Description: An error occurred during the parsing of a resource   requir...
asked by 15.06.2017 / 23:09
3
answers

Alert Box in ASP.NET C #

I would like to ask if in ASP.NET C# you can do a alert similar to the one that can be done in Windows Form with the statement MessageBox . That if I press Si does something and if I press No it is canc...
asked by 22.06.2017 / 04:17
1
answer

Button creation per cycle

How about, I'm doing a cycle to create a certain number of buttons and indeed they are created but I can not make every 5 buttons make a line break, I tried with an if condition but it does not work // Declaramos el Button y un literal que nos...
asked by 21.06.2017 / 20:36
2
answers

Visual Basic Equivalence to C #

I am trying to pass and pass a solution of visual basic to c# , I have had problems in learning the syntax, right now I am stopped with these lines: Conversion # 1 Dim aoIniFile As axdLibrary.IniFileName = New IniFileName(acdat...
asked by 20.06.2017 / 23:51