Questions tagged as 'c#'

2
answers

SqlDataAdapter Query with Parameters

I'm having difficulty returning a query in the database using SqlDataAdapter with parameters. Well, I have a layered application in my View when I first access feed a GridView with a query (this part is ok)! In this same View...
asked by 05.06.2014 / 20:22
1
answer

Web page expired when I return to the page through the browser button. Previous page with postback

In my current application, I have a content list page, which has a small form above to "filter" the GridView below to select an item and go to the next page edit it. What happens is that when I'm on the edit page and try to go back to the lis...
asked by 16.06.2014 / 21:04
1
answer

Access to MySql database via connector / net

I'm developing a system that will access the MySql database just to query data. I made reference to mysql.data.dll and am using access through MySqlConnection. It turns out that the system is returning the following error:    Access...
asked by 18.06.2014 / 15:54
1
answer

Web API 2 - Using ReasonPhrase in exception handling

var resp = new HttpResponseMessage(HttpStatusCode.NotFound) { ReasonPhrase = "Nenhum produto encontrado" }; throw new HttpResponseException(resp); This code should return    404 No products found But for some reason it is not worki...
asked by 13.03.2014 / 15:42
2
answers

Querying the type passed via the generic method

I have the following situation: public List<TEntidade> MeuMetodo<TEntidade>() { //My Code Here } Is there any way I can get the type of this TEntidade? The final goal is to use this Type to create a switch ...     
asked by 17.03.2014 / 18:22
1
answer

How to make the STS request the User PIN after LogOut

I'm having trouble logging out of the application using STS. After clicking the Logout button, I expire all the cookies I have, until I give the FederationAuthentication signout command, but it does not request the PIN again Follow the log...
asked by 11.03.2014 / 19:59
1
answer

ActiveX AxVLCPlugin2 no event works

I have a VLC Player in my form. In it, I need to get basic information like video duration and current position. but no event works. Am I doing something wrong? Here is the code: public Form1() { InitializeComponent(); vlc.play +...
asked by 17.03.2014 / 19:35
1
answer

Kendo UI Grid export Excel

I have the following Grid in * .cshtml: $.ajax({ url: '@Url.Action("RetornaJsonGrid", "PacoteLicencas")', type: "post", cache: false }).success(function (json) { $("#g...
asked by 24.03.2014 / 16:55
2
answers

Method does not work when called

I have two forms: No form1 is a ListBox with some pre-inserted data and a method. In form2 there is a button that executes a method in form1 . //form1 public void limparListBox() { listBox1.Items.Clear(); } /...
asked by 22.03.2014 / 04:05
1
answer

Asp.net Identity Good practice authorization

I have my user using asp.net identity for authentication as usual I have my class implementing IUser public class usuario: IUser { public User(){...} public User(string userName) (){...} public string Id { get; set; }...
asked by 07.03.2014 / 20:39