.net

Windows .NET / Win32 UI development

I've been battling trying to figure out how to visually create a table. It's a weird table that is sortable by column but only rows are selectable. For people using uTorrent it looks something like this I can't find this anywhere in Visual Studio! If it's not avialiable, how would I go about creating it myself? ...

Delete Cascading Issues with Nhibernate/Linq

Im not so sure if this is a problem with nihibernate or linq(i would assume more linq but i may be wrong) I Have website about boxing. There are three tables in this example Boxer (BoxerId among other properties) Boxer_Match (holds a boxerId and MatchId - which is a composite key) Match (MatchId among other properties) Now currently i...

Application.Resources for storing application data

I was just curious if this is a good or bad practice or what the most preferred way of doing this is. The practice I am referring to is that as I am a newb to WPF as I'm going along I have found it handy and useful to put strings, xdocuments, and domain objects into the Application.Resources in the app.xaml when their data is to be need...

.NET/MVC recursive record listing

I'm trying to make my content CMS more user friendly by listing content in the following fashion: Parent - Sub Page - - Sub Page - - - Sub Page - - - - etc... Using .NET/MVC2, where would this function be defined and how would it be called. This is my page listing my content: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Sh...

WatiN with proxy

I've been doing some testing with WatiN lately. For one of the tests I will need to use a proxy to perform the tests. I can set the proxy manually from IE, but I want to do it programatically. In the past I've had success setting proxy for webbrowser control using the code from here http://social.msdn.microsoft.com/Forums/en/Vsexpressvb...

Internationalizing .NET Applications

We have just started exploring what required for internationalizing our applications. One thing I'm not clear on is how the .NET Framework decides what language/culture to use when displaying messages to users etc. Does it do this based on the version of Windows (French, German etc.) installed and/or the region/location selected in any v...

Get the attribute name/string of a class with attribute

Hello, I have a classes called BillingActivity, DevelopmentActivity, ResearchActivity all implementing IActivity. Somewhere in my app I enumerate a dll containing all types. Check wether typeof(IActivity).IsAssignable(type) if so I want to get string typeDescription = type.Attribute.Value or similar what I want is to put a attribute on...

Entity Framework: ObjectSet and its (generics) variance

I use: EntityFramework + POCO Here is the thing: public interface IBaseType { int Id { get; set; } } public class BaseType : IBaseType { public virtual int Id { get; set; } } public class DerivedType : BaseType { } The problem: public class EntityFetcher<T> where T : BaseType { public object GetById(int id) { ...

Getting file path in ASP.NET and XDocument.Load

I have a static class in a folder off root in my solution. In that static class' folder, there's a subfolder containing XML files. So I've got these files: /PartialViews/Header/MyStaticClass.cs /PartialViews/Header/Config/en-US.xml /PartialViews/Header/Config/jp-JP.xml ... I'm having trouble using XDocument.Load() with those XML files...

Architecture Help: Queries on Subsets

Building an application to calculate metrics on Service Level Agreements. I have access to a single, de-normalized, table that gives me the info I need: ticket ID, category/subcategory, open/close dates, ticket priority, etc. The only way to identify the specific SLA being measured is to select by category and subcategory. Then I need to...

Whats necessary to get Accessibility.active to be set true

Trying to get accessibility 'events' from flash - like being informed that there is new content/form and that it should be read. Looking at examples leads me to believe that either the flash apps I'm looking at are not accessibility enabled or that my app is not causing the Flash accessibility to be marked as active. Maybe it as simple...

Keeping Sitecore Lucene Indexes Up-To-Date

I've got a Sitecore application, which creates and uses a number of Lucene indexes through Sitecore's built-in API. I need to make sure that items in the index are kept up-to-date when they are published. To do this, I've created a Sitecore Hook that detects when and item is saved to the "web" database and reindexes the item. It seems ...

How do I read the values of Excel dropdowns or checkboxes from c# or vb.net?

I'm using Microsoft.Office.Interop.Excel to read the values of cells of a worksheet, but I'm unable to find information that shows how to read dropdowns, checkboxes and option buttons. Thanks! ...

string replace using a List<string>

I have a List of words I want to ignore like this one : public List<String> ignoreList = new List<String>() { "North", "South", "East", "West" }; For a given string, say "14th Avenue North" I want to be able to remove the "North" part, so basically a function that would r...

.Net 4.0 System.Web.Security.MembershipProvider ambiguous reference?

I have recently upgraded my BlogEngine.Net installation to 1.6 and .Net 4.0, however, I did not build BlogEngine.Core when I performed the upgrade. However, when I try to build the BlogEngine.Core project now, the compile fails because it cannot load the symbols for (System.Web.Security.)MembershipProvider. I believe this to be a .Net/C...

Identifying Reflection.Emit-generated assemblies

Is there a simple way to identify Reflection.Emit-generated assemblies? When processing all assemblies loaded into an application domain, Assembly instances of dynamically generated assemblies don't behave the same as for standard assemblies. For example, accessing the CodeBase property leads to an exception: string codeBase; try { ...

How to expose WCF4 metadata endpoint in ASP.NET MVC 2 app

I have a ASP.NET MVC 2 application with WCF service defined in it (.svc file using service from a different project). web.config WCF section looks like this: <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="RecordServiceAspNetAjaxBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> <se...

WatiN with webbrowser

I'm using the following code to bind watin to a webbrowser on the winform. Dim w As IE = New IE(WebBrowser1.ActiveXInstance) Settings.AutoStartDialogWatcher = False w.GoTo("http://google.com") I can see from wireshark that the page get's loaded, but the form is frozen until a exception gets thrown "Timeout while Internet Explorer busy...

PInvoke DLL That Uses Other DLLs - ClickOnce Question

I'm creating a .NET DLL that acts as a wrapper using PInvoke on an unmanaged DLL. My question is, if I'm PInvoking an unmanaged DLL that references other DLLs when using click once, which DLLs do I need to include with the deployment of a project that uses that .NET Wrapper DLL? Files involved: Project that uses click once deployment...

Old assemblies don't work in windows 7 64 bit with visual studio 2008 professional

Hi all I just installed visual studio 2008 professional on windows 7 64 bit i am having a problem. I added Nfop as a reference and it was not recognized( yo know the yellow mark on it) then i tried some old assemblies of mine( created on visual studio 2008 but on windows XP) and there was the same problem. How do i solve this? Thanks. ...