Questions tagged as 'c#'

2
answers

I try to upload files to the asp .net mvc server

I need your help I'm starting with asp.net mvc, I need to upload files to the server, this is my html: <form action="javascripts:;" method="post" enctype="multipart/form-data"> <input type="file" id="fileUpload" name="fileUpload" val...
asked by 13.11.2018 / 19:57
1
answer

Avoid duplicate values C #

Good I would like to ask you a question, how can I do to verify that the value written in a textbox is not repeated in the table of the database this would be a portion of the code that is in the presentation layer before being Sent to the metho...
asked by 14.11.2018 / 22:37
1
answer

Equivalence My.computer a c #

I have the following line in visual bAsic: Dim listadoArchivos = My.Computer.FileSystem.GetFiles(directorio, FileIO.SearchOption.SearchTopLevelOnly, filtro) the equivalence in c # what would it be?     
asked by 15.11.2018 / 16:20
1
answer

How to serialize an image (bitmap) in bytes [] C # UWP?

What happens is that I have an image captured from a PC folder //Capturar imagen //https://docs.microsoft.com/es-es/windows/uwp/files/quickstart-using-file-and-folder-pickers var picker = new Windows.Storage.Pickers.FileOpenPicker(); picker.V...
asked by 08.11.2018 / 15:33
1
answer

Filtering by dates SQLite C #

I have a table in SQLite with several fields including a Text type date with the following format: "2018-11-04 12:13:00" Since SQLite does not have the Date field in problems to make queries of dates greater or lesser than one that happens...
asked by 04.11.2018 / 17:13
1
answer

Problem when saving row in DataSet using ADO.net

I bring you another little problem that came up during my project (which is almost finished already). What this code is supposed to do is create a new "Artist" row, add it to the dataset (in its datatable) and update the database. Well, it's cle...
asked by 16.11.2018 / 16:53
1
answer

Query Linq group by

I want to build a linq query by applying group by but I have an extended class in which I have to match the feature class with the extended class. IEnumerable<ModeloExtend> result = Context.Modelos...
asked by 03.07.2016 / 17:24
1
answer

Problems to activate Allow Unsafe. I can not run unsafe

I'm making a website published in hostlocal in C # and VisualStudio 2015. I need to set the AllowUnsafeBlocks option, for a class that uses pointers, but I can not. I'm sure it's silly, but I do not see it and I'm going crazy. When I open the...
asked by 02.11.2018 / 22:25
1
answer

How to convert kilobytes to varbinary?

Whenever I need to store files in a database I use the varbinary (max) field, which is the maximum that the data type supports, and I simply assign a byte array to the field to store it, at this moment I am in the same situation and I have a que...
asked by 23.06.2016 / 19:11
1
answer

The process does not have access rights to this namespace

I am making a personalized WCF encoder following the guidelines of this site using-mtom I create a web Service by taking a file.zip public class Service1 : IService1 { public FileResponse GetData(string value) { FileRe...
asked by 02.11.2018 / 22:05