Questions tagged as 'c#'

2
answers

WebClient request returns empty

In my program I need to get content from my website, but the return of the downloadString method of the webclient object returns null. The most intriguing is that there is no exception, the status code is 200, the request is perfectly executed b...
asked by 06.03.2014 / 18:43
2
answers

Get the value of an input type = text and play in a variable

I'm using ASP.Net-mvc4] in my C # project in Visual Studio and I need to get the value of input type=text that is in my view , and play in a variable in my controller , but not I figured I'd do it. I would give the example...
asked by 07.03.2014 / 20:40
1
answer

Delete From does not work in C #

Why does not the code below work (does not delete)? using (Banco db = new Banco()) { String strSql = "Delete from Cliente where codcliente=" + Session["_uiUserID"]; db.Cliente.SqlQuery(strSql); db.SaveChanges(); } You are not t...
asked by 24.06.2014 / 19:45
1
answer

Problem to create the database using EntityFramework with configuration by DbConfiguration

I'm studying the EntityFramework, writing two contexts to understand how to deal with it when my domain contains many entity classes . That would then be represented by many DbSet's in context, making their startup "heavy." I imagine this is th...
asked by 24.06.2014 / 04:30
2
answers

Why can not I read a string in the console?

I'm trying to read a string typed in the console, which is halfway through the code, but what happens is that it passes straight through and displays the final information. using System; namespace Viernes { class Program { st...
asked by 23.06.2014 / 17:49
1
answer

Gridview Asp NET disappears the Sort after Click to perform Update

I have my Gridview developed manually, the problem is that when I click to make update my gridview stops being sorted and returns to normal. I intended this not to happen. Here's how it's set: protected void CarregaGV(...
asked by 27.06.2014 / 14:23
1
answer

And I have a question about select in sqlite bank in WP

I started using the SQLite database in Windows Phone. And I have a question about select in SQLite database. /* List items = null; items = App.db.Query(“select Nome from Usuario”); ListBox.ItemsSource = items; */ This commented select wo...
asked by 24.06.2014 / 19:11
1
answer

Error while changing application template C # asp.net

I needed to change an application made some time ago in C # asp.net. I added the column in the database that needed and when I add the corresponding field in the model, when running the application it no longer identifies me as a user. (The appl...
asked by 22.08.2014 / 21:18
1
answer

Sql Timeout with WebMatrix.Data.Database

Using the WebMatrix.Data.Database namespace, I'm having trouble executing a query that returns a lot of data, resulting in a Timeout. How can I increase the timeout of this query? Code sample: var db = WebMatrix.Data.Database.Open("Defau...
asked by 20.06.2014 / 19:50
2
answers

GridView Get TextBox Value

I want to get the value of a textbox of a gridview . This Textbox is created by RowDataBound . In the following form: TextBox txtValor = new TextBox(); e.Row.Cells[i].Controls.Add(txtValor); Because gridview is dyn...
asked by 23.06.2014 / 13:07