Questions tagged as '.net'

2
answers

Rendering css when transforming view into string

I'm using the method: protected string RenderPartialViewToString(string viewName, object model) { if (string.IsNullOrEmpty(viewName)) viewName = ControllerContext.RouteData.GetRequiredString("action");...
asked by 09.07.2018 / 15:06
2
answers

Find out how many are older in Windows Forms application

I'm trying to do an exercise in C # using Windows Forms that are over 18 years old. The algorithm should read the age of 10 people. But when I run the program it lets me just type an age. public partial class idade : Form { int qtd...
asked by 12.06.2018 / 19:20
2
answers

How to Increase webform timeout time

How to increase the timeOut time, my session is falling around 5 min, it is not in the connection string. Asp.Net AspNet Identity Authentication <sessionState mode="InProc" timeout="20"/> <customErrors mode="Off"/> <a...
asked by 22.11.2017 / 11:11
1
answer

How do I compile this project in C #?

I'm having trouble compiling with the CSC command at prompt and it's giving a namespace error that I can not fix. I do not know if I'm doing it right. Project Link .     
asked by 31.07.2017 / 12:37
1
answer

Can I store hash code in a database?

I was reading some questions here and a question came up on one of those questions . If I have an application I need to store strings in a database to compare later with something, but I do not need the texts, just need to know if they are t...
asked by 08.08.2017 / 14:35
2
answers

I can not get a variable from another namespace

One project is WebApplication and the other is a Console : "Test Project" SolutionName Structure below: Business (Folder) BusinessDAL (project) DLL.cs file Console (project) Business.cs // BusinessDAL Project...
asked by 04.08.2017 / 15:50
2
answers

Accepting null fields in a Texbox

When I click on "Save", the program does a check of Texbox with a negotiation that I did not to let pass numbers repeat, the problem is that it of error if any Textbox is blank. Here is the code I saved saving the information in an...
asked by 03.01.2017 / 19:08
1
answer

EntityState - How it works

What would the EntityState EntityState serve? When can it be applied? Do you have any examples of why use it?     
asked by 30.04.2017 / 14:00
1
answer

Error TryParse of DateTime by converting string to Double format

I have a method that uses DateTime.TryParse to convert a string to type DateTime , but lately I realized that string with the format Double would also be being converted to date. Is there any solution to fix this? pu...
asked by 20.06.2016 / 14:50
1
answer

Current time in Brazil C #

I'm trying to get the current time of states / DF Brazil with different time. I found the code below but it did not help much. Does anyone know of any way to do without webservice ? public static void Main() { DateTime timeUtc = Date...
asked by 20.11.2016 / 00:48