Questions tagged as 'c#'

1
answer

Problem writing the checkBox text value in my database

You want to save the days of the week selected by the user, saving the contents of the label as a string. What comes to the controller when I select all checkBox Domingo false Segunda-Feira false Terça-Feira false Quarta-Feira I wanted t...
asked by 19.02.2016 / 17:38
2
answers

Parameter query string asp.net MVC

I need to avoid in ASP.Net MVC that a user simply by changing the URL of the page has access to other data. Example, it can access the page www.dominio.com.br/usuario/1 and need to block that it simply by changing the end ( www.domi...
asked by 21.03.2016 / 04:26
1
answer

How to pass a txt file to a Stream parameter?

How to pass a txt file to a Stream parameter? This is the ActionResult that calls the method to read the file txt : [HttpPost] public ActionResult Incluir(ContaReceberViewModel pContaReceber,...
asked by 10.03.2016 / 20:44
2
answers

Dynamic Connection EF C # Windows Forms Mysql

I have the following problem: EF creates a connectionString in the app.config of the application and always uses that connection, but in case you need to change the server of the bank I will have to change the app.config. I have tried a wa...
asked by 11.03.2016 / 23:27
1
answer

Code that leverages decimal value in C # for Java / Android

I have a code that rounds a value of type decimal to homes I want, and I would like to implement it in Android in Java but I'm having some difficulties, here's the code below in C #. public static class Valor { public static decimal...
asked by 16.12.2015 / 18:37
1
answer

Hierarchical Tree View Dynamic C #

I have the following situation, my select returns me 3 micro (child), descr (descr child) and macro fields ) micro fields and macros are integers and can be any number not following standard (when I say default I mean micro 2 for example do...
asked by 10.03.2016 / 17:45
2
answers

Pass the text instead of the id in the dropdown

I wanted to pass the dropdown text to the controller (Post) instead of the id, I do not know how I can do this. Controller: ViewBag.AnoCatequeseID = new SelectList(db.AnoCatequese, "AnoCatequeseID", "Ano"); View: @Html.DropDownListF...
asked by 11.03.2016 / 16:42
1
answer

How to check user in login screen?

I have a problem, I have a login screen and I need to check it with a query Sql . Get something done, but it does not check and goes straight through. private void btn_Entrar_Click(object sender, EventArgs e) { SqlConnect...
asked by 21.09.2016 / 21:26
1
answer

Publish WPF applications

I made a publish of a WPF application with the CD-ROM option. Well, I noticed that it creates folders, an Autorun.inf, a setup.exe, and a Nome_Programa.Application . I was doing some testing, removing every folder / generated files, to the...
asked by 07.06.2016 / 16:23
2
answers

ASP.NET Web Forms and AjaxControlToolkit

Adding a ajax:ModalPopupExtender to my page I'm having the following error <%@PageTitle="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Devcompy.ClientWebForms.Ad...
asked by 10.06.2016 / 14:09