Questions tagged as 'asp.net-mvc'

0
answers

List a restaurant, from the item that is saved in the database, within a table Cart

I would like to list a Restaurant, where items from this same restaurant have been stored inside the cart. Being that, when saving the product of the cart, it pulls with him the ID of the restaurant. Here is my controller that I did, but it did...
asked by 23.10.2016 / 04:54
0
answers

Use two CSS classes in C # Razor MVC [closed]

I'm wanting to use two CSS classes in Razor. Is it possible to do that? Because I can not. I'm doing the following: <div class="form-group"> @Html.LabelFor(model => model.ativo, htmlAttributes: new { @class = "control-l...
asked by 27.09.2016 / 19:01
0
answers

Open subpages in a given space AspNet Core

I have a page where I use @renderBody to open my main pages, however the need arose to get a submenu and I need the following pages to be opened in a certain space, but when I launch the asp-controller asp -action it opens at the @re...
asked by 10.09.2016 / 03:50
2
answers

Return boolean function via ajax

I have the following ajax call on my page: $.ajax({ url: 'EquipamentoTemControleFuncionamento', data: { contratocod: contratocod, numeroserie: numerodeserie }, type: 'POST', dataType: 'JSON', success: function(retorno) {...
asked by 09.09.2016 / 19:57
0
answers

Generating two CheckBox tags being one hidden in AspNet MVC

Good Night @Html.CheckBox("Agree", new { value = false, @class = "filled-in", @id = "filled-in-box" }) When I generate the CheckBox in AspNet, by the above command, it is generating me two Tags being one is Hidden, as I am using the materia...
asked by 22.09.2016 / 03:42
1
answer

Linking Users to Companies and Bringing User-related Records Using ASP.NET Identity and Entity Framework

I have records in the database (for example, clients), and all records have a EmpresaID identifier. I'm using identity with entity framework to authenticate. In the user's registry I have an identifier "CompanyId". I would like to k...
asked by 17.08.2016 / 22:42
1
answer

Configure Route page MVC

I have a website and that upon entering the homepage it is redirected to another view . So:    www.example.com redirects to www.example.com/Home/Hotsite This is because I have a feature that when I enter the view Home/Ind...
asked by 12.09.2016 / 22:58
1
answer

Verify that the 3.5 framework is installed on the machine

I have to perform a C # function that checks that the 3.5 framework is installed on the machine but does not use Registry.LocalMachine.OpenSubKey("Software\Windows\Microsoft.NET\...") , since this function must be used on several different...
asked by 18.03.2016 / 12:09
1
answer

Linq with 2 different context using inner join

I would like to query 2 different databases (2 Dbcontext) I have tried in several ways, one of them: I make a pre-query in the context DbMega to recover the officials var FuncionariosLinq = (from Colaborador in dbMega.Funcionarios...
asked by 17.03.2016 / 14:22
1
answer

HttpContext.Current.Session - Null

For a project business rule, whenever an object of type ViewModelBase is instantiated, I need to perform some validations on the user profile to define which buttons the user will have access to in View that will be loaded. For this,...
asked by 08.08.2016 / 15:35