Questions tagged as 'c#'

1
answer

Open a folder on the user's machine and open a file (csv, txt or xls)

How do I open a folder on the user's machine? I need to open the folder and load a csv, txt or xls file. I use MVC5 It would be more or less that. A button that loads the folder and then I give a load that would be like an upload, I think....
asked by 02.09.2014 / 12:54
1
answer

Put a local image in the body when sending an email

To send an email from the application I'm using MailMessage made available. Now I'm trying to put an image in the body of the email via html: MailMessage mail = new MailMessage(); SmtpClient SmtpCliente = new SmtpClient(server); ... mai...
asked by 27.08.2014 / 11:22
2
answers

Client-Side Validation (Jquery) conditional attribute

Late! I am performing a complex validation on a specific class with the following code (reduced for simplicity): public class Classe1 : IValidatableObject { [Key] public int Id_Classe1 { get; set; } [Required] public int Id...
asked by 29.08.2014 / 18:28
1
answer

How to get data from a BulletedList in CodeBehind ASP.NET?

I have a list of items set through a BulletedList in an Asp.net page. This list is populated with multiple items through the DataSource , DataTextField , DataValueField , and DataBind() attributes in CodeBehind in C #....
asked by 16.04.2014 / 01:05
1
answer

Error reading XML

When I try to read xml, return it to me: {System.Linq.Enumerable.WhereSelectEnumerableIterator<System.Xml.Linq.XElement,SSP.Class.ListaConsulado>}XML:<?xmlversion="1.0" encoding="UTF-8"?> <paises> <pais> <n...
asked by 25.04.2014 / 21:29
1
answer

List of objects back zeroed View even with Hiddenfield

public ComprasOrdemCompras GetToCreate(ComprasOrdemCompras model, int EmpresaId) { ComprasOrdemComprasProduto clsPedidoProduto = new ComprasOrdemComprasProduto(); //Preenchi meu produto INÍCIO // FIM...
asked by 10.06.2014 / 17:48
1
answer

Create a record and add relationship through httpPost of Web Api

When creating a new record in the tab I need to get the id of my main screen and send it along with the new object. Currently I have this code: public async Task<IHttpActionResult> PostMenuProduct(MenuProduct MenuProduct) {...
asked by 06.06.2014 / 18:28
1
answer

Put a decision control inside a lambda expression

I'm building this query: private List<string> pegaInformacaoParceiro(string _osparceiro, string _cnpj) { List<string> lista = new List<string>(); WEBEntities db = new WEBEntities();...
asked by 10.06.2014 / 21:25
1
answer

How to display two pages of the same GridView side by side?

I'd like to know how to display two pages of the same GridView side by side, if possible by keeping the pagination on both pages at the same time. For example, if I have GridView like this: Num Produto -------------- 1 Banan...
asked by 02.04.2014 / 22:22
1
answer

Updater of a web application asp.net mvc

I was thinking here of a structure for automatically updating my web systems on clients, so I thought I'd use ClickOnce with some dodges (technical adaptations). It did not work, it only works for Windows-based applications....
asked by 08.04.2014 / 16:57