Questions tagged as '.net'

1
answer

TransactionScope with multiple StoredProcedures

I'm thinking of implementing TransactionScope in my code, however, all bank accesses are done by StoredProcedures . Can TransactionScope be able to give rollback in multiple actions performed in StoredProcedures...
asked by 10.10.2017 / 16:46
1
answer

Can I run a .NET Native image directly?

I have compiled my executable in C # for a .NET Native image using ngen.exe , I have the location of the file, but when I run Windows it says that the executable is invalid. My goal was to make my application written in C # independent...
asked by 20.01.2018 / 21:10
1
answer

Why this @Html.DropDownListFor does not accept htmlAttributes?

I have a View that will be read-only in some cases. And I do not want to use javascript because it can be disabled on the user side. In the end ... When I do this (for testing) it works perfectly. <div class="form-group"> @Html.LabelF...
asked by 16.11.2017 / 11:50
1
answer

How to put a form inside a tab?

I want to add a form inside a tab , I already tried using the "this.tabPage1.Controls.Add (new form1);" and it did not work, how to proceed?     
asked by 06.09.2017 / 02:18
3
answers

Memory and processing - Variables and verification

Is there a big difference for memory and processing in how to run the check in these two examples? If yes, why and how both behave at the time of executing the codes. Method 1: var exam = FindExamByID(id); if (exam == null) { return No...
asked by 10.08.2017 / 16:13
1
answer

Single entry in ASP.NET form

I have a code that makes the register of certain types of equipment, the form fields that I have are: Name, Server, Type and Port of the equipment. I would like the user not to register two devices with the same port and I do not know how to...
asked by 03.07.2017 / 15:08
1
answer

The input string was not in a correct format

When calling the method below comes the message    the input string was not in a correct format private void SubmitData() { try { string user = usuario.Text; string pass = sen...
asked by 15.06.2017 / 15:43
1
answer

Do not reload page when giving submit in modal

I have a modal to search for clients: Whatiscalledaregistrationformasfollows:$('#linkSearchShipperCustomer').on("click", function (e) { showDialogList("@Url.Action("IndexShadow", "ShipperCustomer")", "IdShipperCustomerDiv", "IdShipp...
asked by 08.06.2017 / 21:30
2
answers

How to configure the Connection String in App.config?

I would like to mount using the saved string: InstanciaSQLServer , UserSQL and PWSQL , is it possible? Example of my app.config <configSections> <sectionGroup name="userSettings" type="System.Conf...
asked by 11.05.2017 / 13:28
1
answer

Create controls dynamically in WPF

I need to create checklists that depend on previous entries and processing. How do I create these checklists dynamically in WPF? (a code snippet, please).     
asked by 13.03.2017 / 13:47