Questions tagged as 'c#'

1
answer

How to send error or info messages to the view with ModelState?

I have the following form with Ajax.BeginForm using (Ajax.BeginForm("MiAccion", "MiController", new { ReturnUrl = ViewBag.ReturnUrl }, new AjaxOptions { OnSuccess = "OnSuccess", OnFailure = "OnFailure" })) {...
asked by 21.06.2018 / 17:31
1
answer

error using CrystalDecisions

In my project I have using CrystalDecisions.CrystalReports.Engine; But this error marks me:    Error 1 The type or namespace name 'CrystalDecisions' could not be   found (are you missing a using directive or an assembly reference?) B...
asked by 20.06.2016 / 23:49
2
answers

Unable to Send Mail [duplicate]

Good this is my code: MailMessage msg = new MailMessage(); msg.To.Add(new MailAddress("[email protected]")); msg.From = new MailAddress("[email protected]"); msg.Subject = "Asunto(Correo Prueba)"; msg.Body = "Contenido Prueba"; msg.IsBod...
asked by 11.09.2018 / 18:14
1
answer

Problem with JSON in MVC5

at the time of writing JsonRequestBehavior.AllowGet I get marked that is badly written or does not exist, in the controller. public JsonResult Clases(string valuemarca) { return Json(obj2.ObtenerVehiculoClaseAsync("", ServicioM...
asked by 28.08.2018 / 16:01
1
answer

Change datetimerpicker format to yyyy / mm / dd of DateTime type in c #

In this code I'm just showing the date dd / mm / yyyy datetime fecha = dateTimePickerFalta.Value.Date I want to get it in yyyy / mm / dd but of type dateTime How can I do it? example: When I select a date, the format it shows is...
asked by 09.11.2017 / 21:15
1
answer

Regular expression to substitute (VIV6a = 1 or VIV6b = 1) and (COUNT ("A3"; "13") = 0 or COUNT ("A3"; "14") = 0)

I have this syntax: (VIV6a=1 or VIV6b=1) and (CONTAR("A3";"13")=0 or CONTAR("A3";"14")=0) some regular expression that gets me the following: (VIV6a=1 or VIV6b=1) and ( =0 or =0) For c # The idea is to be able to change the expressi...
asked by 23.05.2018 / 20:54
1
answer

how you could make a text appear by hovering over a picturebox [closed]

could someone please help me I think the picturebox event mouse hover is used, but I do not know how to use it, please help     
asked by 10.06.2017 / 22:11
1
answer

Send form data with HTML table (multiple records) to MVC controller

Good morning. I work in a MVC C # project and I have a model that represents a table in my database, the model below only represents some properties of my class so as not to create confusion and represent the data of a single Event, the data of...
asked by 12.03.2017 / 14:05
2
answers

Get the elements of a Grid.View with active filters

I'm a rookie and just a little more than the basics. I have a Grid.View that shows me the records of a BBDD. I have a "document browser" that shows me one by one all the documents of the database and allows me to navigate among them. What...
asked by 03.03.2017 / 15:45
2
answers

c # WordprocessingDocument replace text

Hello, I am working with WordprocessingDocument to be able to replace the fields that appear in a Word as ## USER ## and that I generate a document based on a template. using (WordprocessingDocument doc = WordprocessingDocument.Open(dg.FileN...
asked by 11.04.2017 / 12:54