Questions tagged as 'asp.net-mvc'

3
answers

Group repeating sql fill statement values from DropDownList

I'm getting information from a table and filling a DropDownList , but I have a lot of information repeated and would like to group the values so they do not repeat in DropDownList . Example information I'm capturing. Cidade1 Ci...
asked by 10.10.2017 / 20:33
1
answer

arterySignalIr / Ping - What is causing this error?

The project MVC in C# here of the company has a very bizarre bug, to say the least. From time to time a random error pops up: The controller for path ... arterySignalIr / Ping was not found or does not implement IController, see...
asked by 12.01.2016 / 12:58
2
answers

Download PDF file by link in email

I developed a function that passing the Item id it generates a PDF file. [HttpPut] public void GerarPDF(long idItem) { ....Função } It already works perfectly, I did the test through the Google Chrome app called PostMan, and passing the pat...
asked by 22.03.2017 / 15:40
2
answers

Pass generic model to controller

My project follows the following template: InmyControllerIhavethefollowing: InoticedthatIcouldbeusingthisActionResultdynamically.Myviewistyped.Iwouldliketoknowifthereisawaytopassthetypeofmyviewpromodelorsomemeansofdynamicallyreceivingmodelin...
asked by 10.09.2015 / 16:42
2
answers

Pass parameter (a list object) from View (type List) to Controller. Asp.NET MVC

I have a View of type "List<SimpleUser>" and I want to pass to my controller the object that is in my foreach, however this is arriving null being done as follows: View: @{ ViewBag.Title = "Dashboard"; } <!-- search for...
asked by 02.06.2014 / 07:51
3
answers

How to Set a Larger Size for a TextBoxFor

I am using the form-control class of Boostrap, and would like to have a TextBoxFor with a larger size, how can I do this? <div class="form-horizontal"> <div class="row"> <div class="form-group"> @Html.Label("Ti...
asked by 10.03.2015 / 19:36
2
answers

SelectListItem with custom attributes

I created a DropDownList using the method below: private void PopulateDropDown() { //Chamo o método que obtém a lista de clientes da API List<Models.Cliente> clientes = new Business.Cliente().Get(); //Rotorno a lista de cli...
asked by 05.02.2018 / 21:49
3
answers

Sort the children in query Linq

I'm having trouble in ordering a query where I have to sort the children by the ID, Follow Source. public Grid GetByOrderGridData(long id) { var query = from c in context.Set<Grid>() where c.Id == id o...
asked by 28.06.2017 / 14:48
1
answer

How to pass parameter to the constructor of a Controller?

How can I inject a parameter into the constructor of my Controller? I have CategoriasController with a constructor that expects IAppServiceCategories appService , when I call it returns an error. using ProjetoModelo.Application...
asked by 17.08.2017 / 17:48
2
answers

Is it possible to insert the '#' (hash) character in the MVC routes?

Is it possible to insert the # (hash) character in the MVC routes? I'm developing an MVC application in which one of the specifications is the use of # in the MVC routes. Is it possible to do this natively? Is there any way around this?...
asked by 09.08.2016 / 00:30