Questions tagged as 'asp.net-mvc'

1
answer

How to save dynamic checkbox and textbox with a single button in MVC .Net

For each row of the records of my sql table in the view I add two checkboxes and a textbox to later save what has been selected and entered in the textbox, as I can know the checkboxes that were selected, the textbox text since data_id belongs t...
asked by 21.07.2018 / 05:49
0
answers

View to edit a model that has a list of another model

I have the following models: public class Receta { public int ID { get; set; } public string Name { get; set; } public ICollection<Ingredientes> Ingredientess { get; set; } } That in turn: public class Ingredient...
asked by 12.07.2018 / 11:37
0
answers

Member 'IsModified' can not be called for property "Reviews" because the entity of type 'Activity' does not exist in the context

I have a property Reviews in the model Activity , in the action details , I try to increase the Reviews , and I do it with the following code: Db.Entry(entityName).Property(x => x.Reviews).IsModified = true; Return View(...
asked by 19.07.2018 / 16:22
0
answers

how to solve HTTP Error 404.15

My problem is that when making an Ajax request, when I send my information I receive this error:    The Request Filtering module is configured to deny a request when the query string is too long. I see in other forums that it is because o...
asked by 05.07.2018 / 23:21
0
answers

How do I save the result of two variables?

I am learning mvc, I want to work with a payment gateway and I have the payment response variable and also a discount code is not saving the code in the database. if (respuesta.RsptVisa == "1" || !configuracion.PAGO_VISA_VALIDADO.Value)...
asked by 12.07.2018 / 18:14
1
answer

How can I return something in the constructor to use it in my class?

I have an action filter to make a log in a class called LogActionFilter which has its respective methods to perform each specific task, and from my control I call this filter as follows [LogActionFilter] up there all right . The...
asked by 03.07.2018 / 18:15
0
answers

Why do I generate a .Debug .Release file when I deploy from VS?

I have a project in visual studio which I have a file of type config example mifile but when I publish it from the platform (vs) it generates two more files apart from the original, which are mifile.Debug and mifile.Relea...
asked by 03.07.2018 / 16:45
0
answers

How to validate the value of a parameter in the routes?

I am programming in asp mvc with c # and I have an action declared as follows: public FileResult ViewImage(int ImageFileItemId, int MaxWidth, int MaxHeight, bool FixedWidthHeight, string JpegQuality) . I would like to validate that t...
asked by 02.07.2018 / 17:49
0
answers

Message from Timeout Forms Authentication

I need to show a message when the session of the cookie ends but I do not know how to do it. <authentication mode="Forms"> <forms loginUrl="~/Home/Login" timeout="10" slidingExpiration="true" name="KeyAuth" /> </authentica...
asked by 25.06.2018 / 20:07
1
answer

EF CodeFirst and .net MVC Error in insert with ID as Identity

I am developing a login system in MVC, which includes the following entities: Subject, User and Roles The model of each entity is the following: public partial class syssujetos { [Key] [Column(Order = 0)] [DatabaseGenerated(Databas...
asked by 25.06.2018 / 11:52