Questions tagged as 'c#'

1
answer

Import HTML table based on a URL and fill in a datatable

string htmlCode = ""; using (WebClient client = new WebClient()) { client.Headers.Add(HttpRequestHeader.UserAgent, "AvoidError"); htmlCode = client.DownloadString("http://www.site.html"); } HtmlAgilityPack.HtmlDocum...
asked by 20.09.2016 / 15:50
1
answer

Validating event with the '?' [duplicate]

I was implementing a method to throw the event PropertyChanged of INotifyPropertyChanged . I did the event validation in the traditional way, ie with if (PropertyChanged != null) . But VS suggested a leaner form that is P...
asked by 18.12.2016 / 00:18
1
answer

Write a value at a certain position on the screen, outside the form [closed]

I'm developing an application in Windows Forms, with C #. For example: I want to write a text in the youtube search field, as can be seen through: link Can someone tell me how I can send a string, sentence, to a particular position on the s...
asked by 20.09.2016 / 01:14
1
answer

Redirect non-indeterminate users to Asp.net

I have an ASP.NET MVC page, using entityframework, and I have a login system: public ActionResult Index(LoginModel model) { if (ModelState.IsValid) { try { if (Membership.ValidateUs...
asked by 26.09.2016 / 19:51
1
answer

Viewbag for all controllers Asp.Net MVC C #

I have an application in ASP.Net MVC, after the user logs in I need to show their name at the top of the page, regardless of what page it is. This application is an administrative where the name of the company will be at the top, I saw some s...
asked by 26.09.2016 / 21:22
1
answer

Calculate distance between two indexes of an array?

I want to get two indexes of the array, and subtract that value. For example, I want to enter index [0, 1] and [2, 10] . And here I want to subtract the value, to calculate the distance between these points. for (int i = 0;...
asked by 28.09.2016 / 18:52
1
answer

Error sorting GridView with empty row column [closed]

You're making a mistake here that I'm not sure how to circumvent, since my program reads a website, sometimes the site can get out of the norm and end up leaving something empty, so when my GridView tries to sort, since it is bugging ... Here...
asked by 06.09.2016 / 11:44
1
answer

How to pass variables from C # MVC 4 to SSS SCSS?

I need to dynamically change my CSS files by pulling some data, such as colors, from the database. I have chosen to use SASS in the application, but can I import an application variable into MVC 4 into my SCSS file?     
asked by 11.10.2016 / 21:14
1
answer

Change date format on C # / Asp.NET server

I am having a very annoying problem, I am getting a DataDeCadastro from the server that is in DateTime when the date well is in the US version ("dd/MM/yyyy") I use .ToString() to format as I want to. I have a way o...
asked by 11.10.2016 / 15:04
2
answers

Ajax always falls into 'error' even when successful (C # MVC5)

Come on. I have the following method: C # [HttpPost] [AllowAnonymous] public JsonResult PostOnCRM(string textBoxFirstName, string textBoxCountry, string textBoxLastName, string textBoxEmail, string textBoxTitle, string textBox...
asked by 12.10.2016 / 19:23