Questions tagged as 'c#'

1
answer

Save Image c #

I'm having the following error Generic GDI + error. when trying to save the image to a specific directory. I'm using code below. string caminho=@"\.1.1.10\sistema"; Stream myStream = null; OpenFileDialog abrir = new OpenF...
asked by 17.06.2015 / 19:40
2
answers

Array of Bytes x Stream

I'm developing a WCF service that will convert files. I will upload and then download the files. The files are not large. What is preferred in the case of sending and receiving, returning an array of bytes or a stream? Any other more speciali...
asked by 12.08.2015 / 22:41
1
answer

TempData works on Localhost but does not work when published

Thank you for your attention! I'm developing in ASP.NET MVC5 What happens is this: When you run tests on localhost , this code works perfectly. I can retrieve the tempdata containing the object to send it to the View that generat...
asked by 12.08.2015 / 15:09
1
answer

How to do Split in some specific excepting lines?

I want to make a dynamic list that uses Regex.Split separating each item by the new line character, except when in the (...) fields in my lines of code, as follows: var x = 'the quick fox jumps over the lazy dog' var n = 'myChar (st...
asked by 29.07.2015 / 00:15
2
answers

How to resize images before upload using C # asp.net

I am learning .net mvc 4 and I would like to know if there are any good and simple libraries, to resize images before uploading, I researched google and only found complex functions with resizing calculations done in the hand. Since this is a ve...
asked by 11.06.2015 / 19:16
2
answers

C # WebMethod - Send and Receive the same object (custom) via Parameter

My code: Object: public class Person { private string _Nome; private DateTime _Nascimento; public string Nome { get { return _Nome; } } public DateTime Nascimento { get { return _Nascimento; } } public Person(string N...
asked by 11.06.2015 / 16:56
1
answer

Problem loading data with Entity Framework using Include

I'm using the Entity Framework with MySql on my system and I need to do a specific query that includes a list of a Model ( ApplicationUser ), in this list each returned object has in its properties another Model . That is, each...
asked by 06.06.2015 / 01:40
1
answer

iTextSharp deleting document if it does not have pages

Well, I have an application that at one point generates a PDF with all JPG's, however, instead of choosing a JPG I choose an Excel file it just moves that file. Okay, I'd like that if the document I created with iTextSharp ( Doc.Open()...
asked by 11.06.2015 / 16:50
1
answer

SQL database for multiple users [closed]

Well, I have a question. I'm developing a web application that will serve more than one user, however each user has different data recorded in the database, and this volume will be great since the system is for sales management. I would like...
asked by 03.06.2015 / 19:47
1
answer

HttpUtility.HtmlDecode (), Html to Txt intent (at least), can anyone help?

I'm getting a record whose content is below (in HTML): &nbsp; &nbsp; <p style="text-align: justify;"><span style="font-family: times new roman,times;"><span style="font-size: medium;"><strong>EDECPJE N&o...
asked by 05.06.2015 / 17:12