Questions tagged as 'c#'

1
answer

MVC C # How to force SSL - too_many_redirects

I'm trying to force the use of SSL from my MVC WEB application. I've tried with redirect in the global wing, but it goes into lopping too_many_redirects. protected void Application_BeginRequest(Object source, EventArgs e) { if (!Context.R...
asked by 13.12.2015 / 02:00
1
answer

Integration of information from a Web Service

I'm having a bit of trouble creating a Web Service. I have a MySQL database simple to register people. I already have my methods for performing CRUD operations in a classe . which were used in an application Windows Forms...
asked by 17.03.2016 / 15:20
2
answers

Use ViewBag as counter

How can I use ViewBag as counter? WHAT DO I NEED? I'm making phone numbers. When I add a new phone, I send my View to my Controller and it returns me to PartialView of my Inputs . I needed a counter,...
asked by 08.12.2015 / 13:36
1
answer

How do I get the ID of the DropDownList and pass it to a variable in jQuery?

I have the following DropDownList: <div class="editor-field"> @Html.DropDownList("ProdutoId", String.Empty) </div> And this jQuery function that when the user presses the button will pick up the selected valu...
asked by 06.11.2015 / 19:44
2
answers

Double click on the row of a DataGridView transports the data to a form

Good morning, everyone. Next, I have a form (query) that contains the DataGridView. And the registration form in another form. I would like to understand, how can I double-click a row in the DataGridView to send all the data in the row to...
asked by 12.11.2015 / 16:07
1
answer

Search form does not execute controller method

I have the following form: <form role="search" method="get" id="search-form" name="search-form" action="/video/pesquisa"> <div class="cover-pursuit-btn"> <button type="submit"...
asked by 16.11.2015 / 20:26
1
answer

How do I store passwords in environment variables (and remove them from version control)?

I'm migrating from a local tfs to a private git (probably bitbucket). Today I simply encrypt webconfig, now I will have to get my sensitive version control data (connection string, passwords, etc.). How do you do? Environment Variables? As...
asked by 18.07.2016 / 19:58
1
answer

Summary in classes and methods [duplicate]

How important is it to use <summary> in methods and classes? How shocking is this at the development level? What is the good side and the bad side of its use?     
asked by 05.10.2015 / 19:18
1
answer

Use Closure where when class is dynamic

I have a base class: public class MinhaClasse<T> : Controller where T : class { public List<T> BuscarVarios(string nome) { return db.Set<T>().Where(/*?????*/); } } How do I use cloister Where whe...
asked by 20.11.2015 / 16:30
1
answer

Property instantiated by Castle being written to Database as Proxy

I have a Log system that compares two generic classes and writes the property name and the value of it, in a column of my database. When the property is of type string, int, datetime, etc., it is written to the database Name:Valor When t...
asked by 05.10.2015 / 18:59