Questions tagged as 'c#'

1
answer

More performative way to return data to View

In a view where we return a list of objects, and we need to demonstrate the quantity, such as a small report, using some conditions. What is the most performative way to return data to view ? Explaining better. When we return an obj...
asked by 24.07.2015 / 19:40
1
answer

Insert database record into columns of DataGridView in C #

I have a problem: I have DataGridView1 and when I read the database records each line should be added to a Column of my DataGridView1 . Example my DataGridView1 has the Column1, Column2, ... Column10 columns and...
asked by 28.07.2015 / 19:39
1
answer

Modal bootstrap MVC 5

I'm trying to use the modal of Bootstrap , but I can not make the window open in modal form with the page style, instead it opens as a page with no style and using the whole frame of the browser. Following page code: @model MyApplic...
asked by 23.07.2015 / 21:00
1
answer

LazyLoad even putting .include (t = t.Model)

I'm having the error:    Exception Details: System.ObjectDisposedException: The ObjectContext   instance has been disposed and can not be used anymore for operations   that require a connection. When I call: @Html.DisplayFor(modelItem =...
asked by 29.04.2016 / 18:54
1
answer

How to register legal and physical person in c # mvc?

How do I make PeopleController's Action Create to save both the physical and legal attributes? PeopleController: [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "PessoaId,Telefone,Endereco,CEP,Cidade,Estado,...
asked by 24.04.2016 / 23:52
1
answer

Dynamic Linq with C #

Inside the new in linq. I need to create the dynamic properties based on a data table how can I do this? var query = (from indicador in tableIndicado.AsEnumerable() group indicador by indicador.Field<string>("IND_CODUSU") into g...
asked by 18.11.2015 / 17:27
1
answer

Remove namespace or full names

My question is if there is any shortcut, command or function of Visual Studio that removes the namespace or full names of classes, for example: to add a Data Annotation without making a using you have to put the complete namespace System. (), Bu...
asked by 22.05.2015 / 15:41
1
answer

Load txt file through a list c #

I make a query in the database and put it in a list, then I scan each list item through foreach to query other tables according to the Id of each line covered. If found, I would like to load a txt file for each line queried by jump...
asked by 19.11.2015 / 14:26
1
answer

Transferring value from C # to jQuery

Well, I have a job in ASP.NET where I can upload music to a folder on the computer and I already have a function in C# to get the correct file address. Anyway, I wanted to use this path in a music player in jQuery , how? B...
asked by 12.06.2015 / 23:30
2
answers

Problems with ValidationSummary - Asp.Net MVC

I have problems with ValidationSummary in my application that manages Courses , I have a screen where the student enrolls in a course and if he tries to enroll in the same course the Student already enrolled in the course message should app...
asked by 14.06.2015 / 06:31