Questions tagged as 'asp.net'

1
answer

Pass the value of a Label to another aspx page with c #

How can I pass a Label variable that stores a name to another aspx page called Registers? I open the Records page by means of a button like a pop-up window: protected void Ver_Click(object sender, EventArgs e) { string vtn = "window.open(...
asked by 26.06.2018 / 17:16
1
answer

Confirm with data anottation a checkbox

I have a form that contains 9 input of type checkbox I need to validate that when sending the form at least one of them comes tickeado. I have the following in my view <div class="col-12 col-sm-6 col-md-3 li"> @Html....
asked by 29.06.2018 / 21:25
1
answer

Open pdf / doc stored on sql server using asp.net and entityframework

I have a web application in which I am saving files of type pdf or doc in the database in a table with a parameter of type "varbinary", I know that it is not ideal to save such files in the database but I need to know how I can see that file fro...
asked by 21.06.2018 / 22:10
1
answer

Problems with CheckBoxFor and ListBoxFor [duplicated]

I need to render in my view a series of fields type checkbox (9 in total) where if one of them (the number 8) at the moment of clicking on it should appear a field type select , this last I already have it developed with jquery...
asked by 05.06.2018 / 17:38
1
answer

How can I redirect to another external page?

I have an Action Filter that validates if something exists and executes a redirect to redirect to a page x. public class CustomFilterAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext f...
asked by 25.06.2018 / 22:42
2
answers

Procedure or function 'InsertaUsuario' expects parameter '@name', which was not supplied

I have an error when calling my procedures on vs, I am trying to insert users. My procedures are the following: Here I have the name, type of users and ID ALTER PROCEDURE [dbo].[InsertaUsuario]( @id int = 0, @nombre nvarchar(50), @memo nvarcha...
asked by 08.06.2018 / 16:17
1
answer

How to make a personalized data annotation?

I need to validate the routine (Chilean ID) that is entered in a form, for this I am using asp.net mvc 5, but I do not know how I can create my own validator for this data. Can someone help me or guide me on how to create this validator?    ...
asked by 25.05.2018 / 23:33
1
answer

Generate model for the response of an api

At the moment of consuming an api, the next response returns. [ { "MiKey": 0000, "MiKey": 02, "MiKey": "CADENA", } ] Fictitious data My Model: public class RootObject { public int MiKey { get; s...
asked by 24.05.2018 / 14:54
1
answer

CREATE TABLE error after IIS APPPOOL ASP.NET-SQL

I have a web application to mount in the IIS, the question is that when I try to visualize some view that uses data from the BD I showed the error of IIS APPPOOL\Licorera . Checking the internet to fix that error was to give the user pe...
asked by 25.05.2018 / 19:52
1
answer

login and security menu by roles

I have a Project with a web-form called login and a master.page called menu, also a series of tables where I have roles, users and page names, I would like to be able to do when I log in and enter the credentials according to the role to appear...
asked by 25.05.2018 / 05:06