.net

Where can I find a graphical designer for linq

Hello, I'd like to allow my users to design and linq queries even if they don't know linq. So I am thinking about having "SQL management studio" like window with the list of tables, fields and relationships and let the user drag and drop. I could write it myself but it looks difficult. Is there a better way? Is there a solution some...

F# printfn "%A" to clipboard

How can I print any object into system clipboard just like printfn "%A" does? it seems I cannot simply using clipboard.setdataobject(). ...

How to upload to YouTube using the API via a Proxy Server

I am building an application which will allow users to upload videos to a specific account on you tube. I have followed the examples on http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html for direct upload however I am now getting a 407 proxy authentication required when request.Upload(newVideo) is called. I've found a...

Loading Access DB Table to Datatable

I have a database in .ACCDB format with some tables. I'm successfully loading it into an OleDbDataReader with the following code: string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;data source=C:\\marcelo.accdb"; OleDbConnection conn = new OleDbConnection(connectionString); string sql = "SELECT * FROM Clientes"; OleDbComma...

How can I examine the inheritance hierarchy of my c# application at runtime?

Given a class like this: public class A : B<C> {...} Assume that I know how to find A's class type using reflection. How can I figure out at run time what base class it extends (in this case B)? ...

.NET MVC MultiSelectList and selected values

I am trying to set the selected values for a MultiSelectList but the page does not display any values as selected. I have tried every practical way to do this and still get the same results. I am currently trying to pass a list of selected objects in via the constructor. What gets me is that when i inspect MultiSelectList object, the se...

How to tell if a thread is the main thread in C#

I know there are other posts that say you can create a control and then check the InvokeRequired property to see if the current thread is the main thread or not. The problem is that you have no way of knowing if that control itself was created on the main thread. I am using the following code to tell if a thread is the main thread (the ...

Cross-platform embedded database/key-value store for C#

I'm looking for a fast, embeddable key/value store with cursor semantics over key collections (or a simple embeddable DB) that I can use in .NET and mono. Need it to be open-source, would prefer an MIT or Apache style license over a GPL license. Not opposed to a library that needs bindings to be written, as long as binaries are available...

Asp.Net page life-cycle - What tool ( perhaps Reflector?) would enable me to view the order in which page events and their event handlers are called...

1) I know there are lots of web sites that describe in what order events are called during the Asp.Net page life-cycle. But is there also a tool, perhaps Reflector, that would enable me to figure out by myself in what order are ALL the page’s events and their event handlers called during the page’s life cycle? 2) Would you say that try...

Does the .NET 4 memory mapped API support alternate data streams?

Microsoft introduced a new System.IO.MemoryMappedFiles namespace in .Net 4. Does anyone know if it will support alternate data streams? Thx! ...

Automapper: Update property values without creating a new object

How can I use automapper to update the properties values of another object without creating a new one? ...

Detect framework version 3.5

I'm developing an XBAP (Partial trust) application, with multiple (~100) users. In the next version the prerequisites have been bumped from framework 3.0 to framework 3.5, and we need an easy way to detect the framework version of each client machine, and advise them on whether they need to upgrade or not. Any ideas or suggestions on ...

TinyMCE and URL Routing, TinyMCE Doesn't Init Correctly When In Route-Handled URL

I am using TinyMCE in my ASP.net Web Forms CMS application on IIS7 and am having trouble in my content folders that are managed using the URL routing feature of .net 3.5sp1. The root real default page of the application ("/default.aspx") works just fine; I have a custom toolbar and many settings defined for TinyMCE and it all works fant...

C# Pass a property by reference

Is there anyway to pass the property of an Object by reference? I know I can pass the whole object but I want to specify a property of the object to set and check it's type so I know how to parse. Should I maybe take another approach (I cannot change the original object in anyway)? public class Foo{ public Foo(){} public int Age...

Is System.Threading.Timer efficient enough for thousands of concurrent timers?

I'm working on a request timeout mecanism. My initial approach would be to create one System.Threading.Timer for each request. The number of concurrent requests could scale up to thousands. I'm wondering if I should instead create a TimeoutScheduler that would internally use only one timer instead of having one per request. Can anyone ...

the best "Simple" CMS system suitable for .Net MVC

Hello, I'm developing a MVC .Net site and would like to implement a CMS system. So far I have looked at Umbraco, which looks good but the help is poor and the getting started video section is empty, and dotnetnuke, which again looks good but I get the impression its aimed at non developers, plus to has much more than I need and want. I...

WCF hosted in a Web application and compatibility mode

I have a WCF service hosted in a web application (IIS). I need to expose 1 end point over wsHttp and the other over netTcp. I am on a IIS7 environment that makes it possible for me to host non HTTP based services. Anyways, when I browse the .svc file using a browser, I get the error: The service cannot be activated because it does not s...

Difference between 'File.Open()' and 'new FIleStream()'

What's the difference, if any? ...

Paging IEnumerable dataset

Are there any built in paging functions for IEnumberable (or a better library to use)? I know there is Take<>(), but I find myself repeatedly implementing the basic calculations to determine # of pages for a given page size. I realize it's simple implementation, but that's why I'm hoping it's already in the library and I just missed it...

c# .net 3.5 System.Net.Mail

I'm out of ideas! If I do this: string strTo = "[email protected]"; string strFrom = "[email protected]"; string strSubject = "turn on html"; MailMessage mail = new MailMessage(strFrom, strTo, strSubject, "<u>ok!</u>"); SmtpClient smtp = new SmtpClient("127.0.0.1"); smtp.Send(mail); it works, but I see the html tags in outlook. i...