Questions tagged as 'c#'

2
answers

Send message to browser [closed]

I need to send a message like this to the browser: How can I make a site made with C #, ASP.NET and Webforms?     
asked by 08.10.2015 / 23:44
1
answer

New Line StringBuilder message Box C #

I would like to show in a messagebox the records with line break. but the result is this: I'dlikeyoutostaylinebyline;Myimplementationlookslikethis: When I'm debugging, in builder.append I realize that the line break is not i...
asked by 05.05.2017 / 20:17
1
answer

Send mouse click

I would like to know how to send a mouse click on the screen by passing the click (x, y) position coordinates per parameter in C #.     
asked by 31.07.2015 / 20:24
3
answers

How to open a link in a new aspx tab

I'm trying to open a new page on a different tab, through aspx, I got a code on the internet that does this, however, it only works with clicks. follow the code LinkButton1.Attributes.Add("onclick", "window.open('../conheca-os-alimentos-apr...
asked by 17.07.2015 / 17:44
2
answers

The type must be a reference type in order to use it as parameter 'TEntity' in the generic type or method 'DbSetTEntity'

I'm trying to set up an enum in ENTITY FRAMEWORK. But I'm not having success. My Context looks like this: public class MoradaWebContext : DbContext { public DbSet<MeuEnum> Status { get; set; } } The Enum looks like this: public...
asked by 16.03.2017 / 20:20
1
answer

Format query in linq to send to the ViewBag

I made a query in linq, but the result was not expected, it seems the problem is simple but I can not solve it. Result on label:    {Year = 2016/2017} Expected result on label:    2016/2017 Controller: //query var queryAn...
asked by 10.03.2016 / 20:44
2
answers

Assemble possible combinations

I have the following classes: public class Categoria { public int Id { get; set; } public string Nome { get; set; } public bool Primeiro { get; set; } } public class Opcao { public int Id { get; set; } public string Nome {...
asked by 14.10.2014 / 20:14
2
answers

Doubt as to Request.Form

What is the Request.Form? How do I interpret these lines? if (Request.Form["chkTornarObrigatorio"] != null) ventRegPendencia.IcDocObrigatorio = int.Parse(Request.Form["chkTornarObrigatorio"]);     
asked by 13.11.2014 / 14:21
2
answers

Prevent the user from voting on the same Post

I created a voting system, where users can give like / dislike in chapters of books posted on the site. Here is my action: public ActionResult Like(int id) { int iduser = Convert.ToInt32(Session["IDUsuario"]);...
asked by 06.11.2014 / 04:11
2
answers

Layers to develop web service

I'm developing using REST (with RestFull API), where I plan to use two layers in the system: BLL and DAL. BLL = > It would be the business rules layer. DAL = > It would be the layer responsible for accessing the data. It could be DAO...
asked by 02.06.2015 / 21:35