Category : .net

Q(Question): Hi can anyone give me regex for validating password which should allow 9 characters exaclty and I numeric and 1 Uppercase any number of lower case letters..please……….. Thanks. in advance A(Answer): i think it depend on one’s requirement like ur’s is exactly 9 char, 1 number and 1 upper case. i have one for ..

Read more

Q(Question): Hi all how can i access MSMQ which is on a different domain or it is even possible? Thanks A(Answer): The .NET Framework exposes a number of classes and methods in the System.Messaging Namespace that allows access to MSMQ. <edit> Sorry, miss read your question…. The System.Messaging namespace provides classes that allow you to ..

Read more

Q(Question): hi all, I m using a web service but i m geeting an error – ex {"An error (Unable to read data from the transport connection: Attempted to read or write protected memory. This is often an indication that other memory is corrupt..) occurred while transmitting data over the HTTP channel."} System.Exception {System.ServiceModel.CommunicationException} now ..

Read more

Q(Question): Hallo everyone, Iam using a openFiledialog to open when a click a button. If i click the cancel button in the openFiledialog how can capture that event ?.. Thank you. A(Answer): @sarabonn Try this System.Windows.Forms.DialogResult myResult; myResult=openFileDialog1.ShowDialog(); int i = Convert.ToInt32(DialogResult.Cancel); if (myResult==DialogResult.Cancel) { MessageBox.Show("Specify file..

Read more

Q(Question): I am trying to fetch public key from DSA certificate using .NET cryptography API. It is taking 15 to 45 seconds….. String crtFileName = "C:\mycert.crt"; X509Certificate2 x509 = new X509Certificate2(); byte[] rawData = System.IO.File.ReadAllBytes(crtFileName); x509.Import(rawData); // START DateTime tm = DateTime.Now; DSACryptoServiceProvider dsa1 = (DSACryptoServiceProvider) x509.PublicKey.Key; // TAKING 15 to 45 SECONDS TimeSpan ts ..

Read more

Q(Question): Hi all I have a listview with checkboxes and I would like to catch the doubleclick event on an Item. Everything is o.k, BUT, the double clicking on the item, also checks/unchecks the checkbox of the item, which I don’t want. Can I work around this ? Thanks In advance. A(Answer): You can create ..

Read more