Questions tagged as 'c#'

2
answers

Text box to determine amount of digit usage

Below is the code that I am trying to limit the use of letters in the text box, except for the comma, but it happens that the comma can be typed a hundred times, I would like the comma to be used only once. How is it correct? private void tex...
asked by 17.12.2017 / 14:52
1
answer

MongoDB no Azure

Some time ago I had an unpleasant surprise on my azure invoice because of a MongoDB database that I owned for access to an application. I created, for example, the documents: Client Product Request I did all the programming in a re...
asked by 14.11.2017 / 18:26
1
answer

Data in duplicate datagrid

I'm developing an application in WPF and when I populate the datagrid via code it returns the duplicate value. I'm using Entity Framework. XAMLCode<DataGridx:Name="dataLocal" Margin="10,111,11,10" IsReadOnly="True" SelectionMode="Single"&...
asked by 03.02.2018 / 01:57
1
answer

Xamarin: Pass data from the selected item in a ListView to another screen

How do I move selected data from one screen to another in Xamarin? I have a ListView that receives information from an Api and I want the user to click on the item, view this information on another screen, below the private async void On...
asked by 03.02.2018 / 23:25
1
answer

Help with ASP MVC routes (3 routes for the same action)

I have a controler: public class imoveisController : Controller { public ActionResult Index(int idEstado = 0, int idCidade = 0, int[] idRegiao = null) { string IdEstado; string IdCidade; int[] IdRegiao;...
asked by 14.12.2017 / 20:38
1
answer

How to clean textbox from another Window? - WPF [duplicate]

Follow the code below: MainWindow mainwindow = new MainWindow(); mainwindow.listbox1.Items.Clear(); // tentativa //mainwindow.listbox1.ItemsSource = null; I try to clean listbox from another form ... nothing happens. Any soluti...
asked by 14.12.2017 / 03:06
1
answer

DataConnectionDialog giving error in Visual Studio 2017

I am migrating to a Visual Studio 2017 a legacy project that uses a modal window to collect connection data to the database and format a connection string. The code below displays an error: var dialog = new DataConnectionDialog();    C...
asked by 22.12.2017 / 20:57
1
answer

Pass Aspx page values to Aspx.cs

I have an Aspx page the following code that loads a list of items. It is working, the list is displayed normally. <table width="100%" class="table table-striped"> <tr> <th>Id</th> <th>Nome</th> <th>CPF...
asked by 23.12.2017 / 21:38
1
answer

Predefined type 'System.ValueTuple'2' is not defined or imported

I'm using asp.net mvc and in my controller, I have the code below: [HttpGet] public JsonResult salvaItem(items item) { items oItem = new items() { address = item.address, bairro = item.bairro...
asked by 23.12.2017 / 14:29