Questions tagged as 'c#'

1
answer

How to make mix of MVC Razor and javascript when there is "}"?

I have a list of objects that I send to view to show images as a book, so I do a mix of razor with javascript , but it gives me an error by the } keys. Code: <script type="text/javascript"> $(document).ready(fu...
asked by 28.10.2016 / 02:30
4
answers

return error message with "Throw Exception" or "Return"?

Hello, the question arose to me, which is the best way to return a message in the event of an error? Throw Exception: try { ....... return cargarPersonas; } catch(Exception e) { throw new Exception("Mensaje.", e); } Return: try...
asked by 28.09.2016 / 22:45
1
answer

Error executing code with ListView, SelectedItems

I have an application which consumes several web services. What I'm trying to do is once this service is called, which should give me a list of project names, I'd like to add them to a ListView and that the user can choose which projec...
asked by 10.10.2016 / 17:21
1
answer

Error trying to insert dynamically in lists of c # (You can not add or insert elements in more than one site)

Well now I want to fill a listview with information from my Database, but I get the following error:    Can not add or insert item in more than one site. You must first   remove it from its current location or clone it. Current Code:...
asked by 08.04.2017 / 00:28
1
answer

How to create PK identity in temporary DataTable?

I'm working on a Windows Forms app, Visual Studio 2015. The scenario is that I have a DataGridView where I will enter items to a Detail, I will enter data from a product of a range of sizes that are worth a price, and the same product I will ent...
asked by 12.08.2016 / 18:08
3
answers

C # open other applications

How could I call applications external to mine without having to use a route? Is there any other way?     
asked by 12.08.2016 / 02:47
1
answer

reference System.Net (Windows CE)

good afternoon, I add the reference System.net to be able to send emails but it happens that when I add the reference from the location of this, for some reason I do not load the System.Net if not System.Net.Irda and for...
asked by 10.08.2016 / 19:58
2
answers

Generate a wait in browser with C #

I am trying to automate a web page using the gecko engine, it is similar to the webBrowser that has Visual Studio incorporated. I'm using the event navegador.DocumentCompleted += (senderx, ex)=> To wait for the page to be completed, I am...
asked by 25.07.2016 / 16:51
1
answer

Data showing a DataGridView in C #

How to know if a DataGridView shows the same information every time you execute an SQL query? private void timer1_Tick(object sender, EventArgs e) { data.DataSource = ""; /* Cargar datos */ data.DataSource...
asked by 14.10.2016 / 22:19
1
answer

Save text string in MySQL

Good, I am trying to save the text that the user writes in a textarea, this text I show it later something like this:    Instructions:       Instruction 1.    Instruction 2.    Instruction 3.    What I do at the moment is to force the...
asked by 14.09.2016 / 17:07