Questions tagged as 'c#'

1
answer

HTTP Error 500 using HttpWebRequest

I come here to ask for help regarding HttpWebRequest requests. I need to get the html return from an HTTP 500 error (HTTP / 1.1 500 Internal Server Error). Could someone tell me how it could be done? Below is an example of a HttpWebRequest reque...
asked by 18.08.2015 / 20:39
2
answers

Doubt with global variable in a controller

I have a method in my controller which is called through ajax. It populates a global variable within this controller . Is there any way I can access this global variable already populated by the first method if I call another ajax method o...
asked by 18.08.2015 / 19:42
3
answers

How do I add or subtract a digit in the TextBox with a button?

I want to add a number to a TextBox by generating a number when the user clicks the "+" button and subtracts when clicking "-". For example: the random number was 2. If I click on the +, it appears 3. If I click on -, the 1 appears. It...
asked by 25.08.2015 / 16:54
1
answer

What are the good points of using View Engine Aspx instead of Razor?

When I search on ASP.Net MVC , I always find all examples of views with Razor (I do not remember exactly if I saw any in aspx) and in the past I remember that I could select this View Engine when creating a new one web applic...
asked by 05.03.2015 / 18:03
1
answer

Mount a local package manager (NuGet)

Due to a huge problem that happens here in the company, such as package dependencies, then the company decided to create a private%, which runs locally. The purpose of this is when anyone downloads the source code of our applications, he already...
asked by 14.12.2015 / 17:27
2
answers

Error while executing project in Visual Studio 2015

When compile gives sucessfull , but when I try to run my project I get this error below. Can anyone help or give me a hint? I use visual studio 2015.    Severity Code Description Project File Line Error Could not write lines to fi...
asked by 24.11.2015 / 17:53
3
answers

Why should I use the typeof keyword to assign a data source to a BindingSource.DataSource?

For example: BindingSource bs = new BindingSource(); bs.DataSource = typeof(object); For what reason should I use typeof(object) instead of just object or even "object" ? edit: As others have asked, here is...
asked by 01.12.2015 / 00:26
1
answer

Pass an object to a modal Bootstrap

I need to pass a database object to a modal when I open it to show the object information. Is it possible to do this? follows the cshtml of the view in which the modal button is called, it opens correctly but I can not pass the object informa...
asked by 10.12.2015 / 20:10
2
answers

What is the equivalent of UserControl in ASP.NET MVC?

In Web Forms we have UserControl . These controls have a code-behind and a layout. They can be used in different projects / solutions without depending on other things. I want to create a control that displays multiple elements and so...
asked by 22.12.2013 / 01:30
2
answers

How to use special characters in strings?

What are the ~ and @ characters in the path string in ASP.NET. Example: StreamReader srFile = new StreamReader(@"\server\pasta\arquivo.html");     
asked by 04.02.2014 / 14:01