Questions tagged as 'c#'

1
answer

Encryption of a class in C #

I have the following code in PHP: $params = json_decode(trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $api_secret, base64_decode($enc_request), MCRYPT_MODE_ECB))); Where the result is an array and not a string. My data I need to send is t...
asked by 29.12.2015 / 16:15
1
answer

Webforms Upload multiple files

I have a WebForms application that needs to receive multiple files that will be associated with a specific type of my system. Ex: Type : [Driver's license] | File : img001.png Type : [Proof of residence] | File : comp001.pdf...
asked by 05.01.2016 / 20:13
0
answers

How to restore the backup made with SMO?

I need to back up and restore using SMO. The backup I can do now, when I select it in the combobox by typing the server name and the error database. Here is the code for the restore button: private void restauracaoButton_Click(object sender...
asked by 04.01.2016 / 15:23
2
answers

Asp.Net DropDownList tooltip or title with JS

I'm starting in Javascript, and would like my DropDownList of a .ascx control, when selecting an item, display its full value when hovering the mouse, like a tooltip or title.    This is my DropDown: <asp:DropDownList CssClass...
asked by 05.02.2016 / 15:16
1
answer

Doubt with textbox

I'm trying to create a log screen using textbox in C# . At certain points in the program, I'd like to insert a line in this textbox . Take the example: Linha 1> Realizando inserção.. Linha 2> Dados inseridos....
asked by 04.02.2016 / 20:09
2
answers

I can not connect the localDB with visual studio

I'm trying to use the entity framework in Visual Studio, but when I try to run the program it generates the error: System.Data.SqlClient.SqlException was unhandled Class=20 ErrorCode=-2146232060 HResult=-2146232060 LineNumber=0 Me...
asked by 16.11.2015 / 18:50
1
answer

Allow only one instance

How do I make my application run only 1 instance at a time? void Main(string[] s){ //faz algo }     
asked by 12.12.2015 / 18:54
1
answer

Randomize different PartialViews at random

I have the following scenario: I have to pass to a view data of different tables (similar data, but without any relation), until then I got it good. I created a class (viewmodel) that receives the data, in the Controller food it wh...
asked by 10.12.2015 / 17:42
0
answers

Records in ICollection navigation property are not being written

I'm trying to include items in a property of type list but I'm not able to include the records in the database. Firstly I have the following class models: public class Frota { public Frota() { Veiculos = new List<Veiculos&g...
asked by 11.12.2015 / 15:06
1
answer

Take a snippet from a string

I want to get the word "[email protected]" inside this MetroMessageBox I tried this, but it did not work: String[] palavra = ex.Message.Split(new String[] { "(", ")" }, StringSplitOptions.RemoveEmptyEntries);     
asked by 10.12.2015 / 12:57