.net

Silverlight - How do I make each item in a list box be the same height?

How can I make a silverlight listbox have all items be the same size and have them take up 100% of the listbox height. I.e. 1 item would be the height of the listbox, 2 items would each be 50% of the height of the list box, etc... Edit - Here is the code public class UniformPanel : Panel { protected override Size MeasureOverride(S...

LINQ to SQL: Grouping and limiting a record set

Hello all, I'm using LINQ to SQL and I have a stored procedure which brings back a result set that looks like so: Type Field1 Field2 5 1 1 6 2 0 21 0 0 I'm hoping to do a few things with this record set: 1) Have 3 groups of results, one that has values in both field1 and field2, one t...

.Net 2.0 & SQL Server 2008 Hanging Process

I created a simple .Net web service which runs a very simple query (which should normally be very quick). The query is something like this: SELECT v.email FROM dbo.Reporting r INNER JOIN dbo.Reporting_EmailList el ON r.reportID = el.reportID INNER JOIN OtherDB.dbo.V_ActiveDir v ON el.userGUID = v.objectGUID WHERE r.reportID = @repor...

Is it possible to have architecture guidelines? If so what should be in them?

In the same way we have coding standards, can there be things such as architecture standards? These would be high level principals that we can pass to our less experienced programmers so when they start designing changes or small applications they know what we expect to see without the more experienced programmers having to correct them...

Turn Off DefaultSettingValueAttribute Create on Applicaiton Settings for .Net Application

I have a dll that accesses a database and reads the connection string from an application setting stored in the config file. The application that references this dll will then need to set the value for this config setting in its config file. The problem I'm having is that the generated config code automatically uses my dev connection ...

Performance counters incrementing improperly?

Probably a rookie error, but i'm getting something strange. i'm trying to weave a .NET performance counter into an application. When i call the incrementBy(value) method on my avg performance counter it is changing the RawValue of my base counter by value as well. i checked the variable names and think everything is correct. Then when...

Loading a DataSet with table definitions & relations (but not data) from SQL Server

I'm not an expert with either System.Data nor SQL Server, but have a need to generate a large DataSet then use System.Data.SqlClient.SqlBulkCopy to store the results. The DataSet will consist of about 10 related tables. When SqlBulkCopy transfers the DataSet to SQL Server, my understanding is that rows from the various DataTables will ...

Can you process T4 templates from inside a .NET application?

Can you process T4 templates from inside a .NET application? Is that code available to be called? included in a project? licensing? update: so it does look like you would have to use VS in some way. ...

How to use ECDiffieHellmanCng with OpenId in .Net 3.5?

Hello. I need to get those parameterso of OpenId protocol: sd["openid.assoc_type"] = ???; sd["openid.session_type"] = ???; sd["openid.dh_modulus"] = ???; sd["openid.dh_gen"] = ???; sd["openid.dh_consumer_public"] = ???; How can I get it using ECDiffieHellmanCng? Is it real? ...

How Do I Validate a JPEG Image in C# / .Net is not corrupted.

I need to be able to validate if a JPEG image is valid and not corrupted. This is not the same as question 210650 which just asks wants to validate that it is, in fact, a JPEG image. Loading from Image with validation eg: var testJpg = Bitmap.FromStream(filename, useEmbeddedColorManagement, validateData); will not throw an except...

Best tool for monitoring Coldfusion interoperability with .Net web service

Is there a tool to see the message sent to webservice hosted on an IIS server? I have a webservice written in .Net and our ColdFusion people are having trouble building a "complex" parameter. This problem is described from a ColdFusion perspective at: adobe forum question It runs when called from a .net client. While hosted on a server...

Replacing <p>, <div> tags within <td> tags?

I'm working on a specialized HTML stripper. The current stripper replaces <td> tags with tabs then <p> and <div> tags with double carriage-returns. However, when stripping code like this: <td>First Text</td><td style="background:#330000"><p style="color:#660000;text-align:center">Some Text</p></td> It (obviously) produces First Tex...

Is there a way to get the variables that were used in a RegEx.Replace to use in .NET?

For example, i have a pattern that i am searching for using the \G option so it remembers its last search. I would like to be able to reuse these in .NET c# (ie: save the matches into a collection) For Example: string pattern = @"\G<test:Some\s.*"; string id = RegEx.Match(orig, pattern).Value; // The guy above has 3 matches and i wa...

Visual Source Safe 2005 Remote Access

I want to let VSSDB accessed via internet (not LAN) from one machine to another. Update I Thanks for reply but it doesn't. It's saying something failed to enforce SSL requirement on IIS. VSS web services would be disabled on this machine.... Update II Is it possible to connect it after establishing VPN? how ...

.NET PropertyGrid Collection Editor and List<T>

I'm using the PropertyGrid control in a WinForms application. The window itself binds to a class that contains a list of objects. While I'd prefer it if the grid just expanded and let the user modify the items like a tree-view, I'll settle for the collection editor if it will stop listing the members as "Roswell.Windows.Command.Model" (t...

Virus / Spam Scanner Programatically for .NET ????

I am writing a piece of messaging software that will send and receive text, voice, fax etc. via SMTP (email). I need to Programatically have the ability to scan incoming and outgoing emails for viruses, spam etc. QUESTION: Can anyone offer a suggestion on a product to use for this? I tend to stay away from the consumer level software (...

Open Source Financial Library Specifically Yield To Maturity

Does anyone know of an open source financial library that implements Yield To Maturity and other fixed income calculations? The library needs to be callable from .Net. ...

Infragistics Clickable PieChart

I am attempting to create a clickable piechart in ASP.NET 2.0 with C# using version 7.1 of Infragistics' software. The chart appears as it should, but the function marked in the OnChartDataClicked event is not called. From the .aspx: <igchart:UltraChart ID="UltraChart1" runat="server" OnChartDataClicked="DataRegionClicked">        <...

C# .NET Linq Memory Cleanup or Leak?

I have a large 2GB file with 1.5 million listings to process. I am running a console app that performs some string manipulation then uploads each listing to the database. I created a LINQ object and clear the object by assigning it to a new LinqObject() for each listing (loop). When the object is complete, I add it to a list. Whe...

How do I ignore event subscribers when serializing an object?

Note that I'm answering my own question since I think it might be useful to have the information on the site! FAQ: It's also perfectly fine to ask and answer your own question, but pretend you're on Jeopardy: phrase it in the form of a question. When the following class is serialized with a BinaryFormatter, any objects subscribin...