Questions tagged as 'asp.net'

1
answer

Could not load type 'ProjectName.MvcApplication' when duplicating project

I duplicated my project in Visual Studio as follows: 1 ° I entered the file system and gave CTRL C + V to the folder SiteTeste which is the project folder. 2 ° I renamed the folder to Siteteste2 and then renamed the fi...
asked by 24.07.2018 / 22:25
1
answer

Pages .aspx in View folder in ASP.MVC project

Good afternoon guys, I am a beginner in MVC architecture and am having a question in an ASPNET.MVC project. I would like to know if it is possible in the "View" folder of the project, put an "aspx" page together with the "cshtml" files. If...
asked by 27.07.2018 / 21:57
1
answer

Prevent duplicate registration with C #

I'm having difficulties with registration in duplicity. How do I make the data after the user fill out the form at the time of saving the data compared to the one in the database, if it has any repeated field it does not save the form data?...
asked by 30.07.2018 / 21:46
2
answers

Back to previous page - mvc page razor

I'm trying to get back to the previous page, like this: string urlAnterior = Request.Headers["Referer"].ToString(); if (urlAnterior.Contains("Pagina")) return RedirectToAction(""); else return RedirectT...
asked by 03.07.2018 / 16:56
1
answer

How to create a filter between two dropdowns using jquery

I have two dropdowns (state and cities) do not select "status" I have the options of two ex states: <select name="state"> <option value="NY">New York</option> <option value="LA">Los Angeles</o...
asked by 11.10.2018 / 11:55
1
answer

ConnectionString returning null

When trying to execute my project I got the error:    System.NullReferenceException: 'Object reference not set to   an instance of an object. ' I have a bank class with the constructor: public bd() { conexao = new SqlConnection(Confi...
asked by 23.01.2018 / 19:25
2
answers

Disable ASPxRichEdit buttons

In my application, I use the ASPxRichEdit component, which is a full-text editor for saving, opening, changing the font, etc. However, I do not want some buttons such as Open and Save , for example, to be visible to the user. How can I hide...
asked by 30.01.2018 / 14:18
2
answers

Attach Dropdowlist Item and a li asp.net mvc

I have a View with dropDowlist that contains data that comes from the database and right down I put a buttom that when I click it will attach the selected dropdownlist item to a list, I made a code here but it is not appending if I putting defau...
asked by 01.02.2018 / 01:42
1
answer

Save the form so that when it returns an error it does not delete the inputs

I am doing a registration system, when the data is correct it saves the bank in a good, when it gives error it returns where it is wrong but it erases everything that was filled or is not viable what I want is that when the user tries to registe...
asked by 29.12.2017 / 15:20
1
answer

Does not display data on Api web screen asp.net mvc

I started to study a little web api using with asp.net, I am doing a very simple example where I just want to list the data of the employee table, but I get error: No MediaTypeFormatter is available to read an object of type 'IEnumerable'1' fro...
asked by 02.03.2018 / 00:57