.net

wpf Mouseclick on textbox

how to set the command and command parameter on mouseclick on textbox in xaml? ...

Signing of .NET Assemblies

What does digital signature have to do with strong named assemblies. I read that a strongly named assembly has public key and digital signature with it. Reference: Signing the assembly involves taking a hash of important parts of the assembly and then encrypting the hash with the private key. The signed hash is stored in the assemb...

How do I generate a .proto file from a C# class decorated with attributes?

Trying to get my mind around google protobuf. I found some implementation of protobuf in C# but they seems to lack one feature: the ability to generate .proto files automatically from an existing C# class decorated with attributes. The reason I want to do it this way instead of going from auto-generated C# classes from .proto file is be...

How do I preserve the mode and the key?

I display the below in the Inner Html and assign the value to the mode: resultsdata1.InnerHtml += "<tr><td><a href=""Results.aspx?mode=2&key=" & dr("UID") & """>" & dr("PPS") & "</a></td><td>" & dr...... 1)How do I preserve the mode so that I can test for mode value in page load event? 2)How do I find out which the key has been click...

What is the best approach if you have to implement a minimal change on several places of your application?

Hi SOlers, some time ago we implemented impersonation into our application (a DMS system). We did this because the users should not have access to the physical files of the document pages. So the user logs into our application, gets impersonated to a special user so he can access the files he needs from within our application. When th...

Filtering a DataGridView per column with filters visible above columns

Hi, I have a rather specific query - I want to be able to retrieve data from a database, display it in a DataGridView and allow the user to filter columns by inputting simple filter queries above each column. For example:- | Foo | Bar | Baz | ------------------------------------| Filters | > 10 | 1/...

.Net DataView and DataTable Binding

I have a simple Windows Forms application which binds a DataView to a ListBox. This DataView uses Linq to sort my DataTable by a specific column descending. My ListBox is then bound to the DataView. I then have a simple form to add data to the DataTable. When I add a DataRow to the DataTable it displays in the ListBox. I'm curious as to...

Multiview - View Clear State

Hello all, Thanks in advance for your help. I am using c#.net. I have two views on my webpage (contained within one multiview), both contain buttons. view_1 Contains a repeater/datasource and an custom made ‘edit’ button (which holds the ID for each row returned). view_2 Contain an ‘update’ form and a ‘update’ button. When the u...

How to get Last Index Of "%" in a string ?

How to get Last Index Of "%" in a string in .NET ? I tried string subString = content.Substring(0, startIndex); int nextOpeningComment = subString.LastIndexOf("%", 0); This is always giving me -1. Here subString I'm getting is: <div id=\"xyz\"> \r\n <img alt=\"\" src=\"App_Themes/Default/Images/abc.jpg\" />\r\n <%-- Any h...

Enterprise Library ExceptionManager: "Log entry string is too long."

We use Microsoft's Enterprise Library (4.1) and frequently have the following problem: [ArgumentException: Log entry string is too long. A string written to the event log cannot exceed 32766 characters.] System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] ra...

C# Service Timeout (30000 milliseconds) waiting for a transaction response in event viewer

I have a C# service. It is a memory and CPU pig. It will run all night, moving data in the database. Around 7 am it post to the event viewer, repeatedly, Timeout (30000 milliseconds) waiting for a transaction response from the ServName service. Then it stops unexpectedly. Does anyone have input as to what this message means, o...

What are Side-by-side Assemblies?

I came across Side-by-side Assemblies for the first time today while trying to install a Debug install set to a test machine. I managed it in the end, but was left with several questions: Whare are Side-by-side assemblies? How does Windows deal with these assemblies differently from other assemblies How do applications depending on Sid...

SplitContainer.Panel1 Selection to Changes SplitContainer.Panel2 selection

The MSDN documentation for the SplitContainer controls says: With the SplitContainer control, you can create complex user interfaces; often, a selection in one panel determines what objects are shown in the other panel. So, I have a SplitContainer that is split horizontally having top and bottom panels. What I would like to...

Is there a built-in C#/.NET System API for HSV to RGB?

Is there an API built into the .NET framework for converting HSV to RGB? I didn't see a method in System.Drawing.Color for this, but it seems surprising that there wouldn't be one in the platform. ...

The easiest way to populate a collection from XML file in .NET

I have the following XML file: <?xml version="1.0" encoding="utf-8" ?> <scripts> <ScriptName> <name> "My Name" </ScriptName> <ScriptBody> "body contents" </ScriptBody> </script> </scripts> And the following object: public class DbScript { #region Constructors public DbScript() ...

.NET Runtime 2.0 Error

I keep on getting .NET Runtime 2.0 Errors (reported in the Event Log) on my test machines, I tend to get these when swapping assemblies out for those with more debugging / diagnostic information (or fixes). An example message: Faulting application MyApp.exe, version 1.0.0.66, stamp 4a3851fa, faulting module kernel32.dll, version 5.2.379...

C# .Net variable unexpected re-initialation

So I am experiencing an issue with an .aspx page and some server side code, where I am getting unexpected results. The goal of this page is simple, there are 5 radio buttons and a button with a server side onclick function. The idea is the user picks 1 of the 5 radio buttons, and then clicks the button. Upon clicking the button I verif...

Removing duplicate string from List (.NET 2.0!)

I'm having issues finding the most efficient way to remove duplicates from a list of strings (List). My current implementation is a dual foreach loop checking the instance count of each object being only 1, otherwise removing the second. I know there are MANY other questions out there, but they all the best solutions require above .n...

Atalasoft DotImage Licensing...

Hi, I have been trying to find decent Image Acquisition + Image Processing solution at a bargain price. I have looked at names like Kodak, Global360, Iris. What I found with all these vendors is that they are very, very, very expensive. I have also found that the SDK API licenses are just as expensive, if not more. Please see Atalas...

Visual Studio - smarter word completion wanted

I'd like word completion to show all matching type names (not only those in imported namespaces). If nampespace of that type is not imported - it should be imported as I choose the type from list, and if that type was in the non-referenced assembly - that assembly should be added to project references (adding imports and references - aft...