.net

MainMenu with Images (WinForms, C#)

Hi All I have a MainMenu in my app and I would like to have little icons relevant to the Item in each menu. But the MainMenu control does not support this. I would use the MenuStrip control, though that is a pretty ugly option in my opinion. Does anybody have any suggestions? Are there any free/open source alt's out there, or would it...

asp.NET Dynamic Data Site and asp.NET MVC-2 site together

Hi, I have created firstly ASP.NET MVC 2. and write more functionality. After I create asp.NET Dynamic Data Site. now, when I click on run button in Visual Studio, mvc app. opened in browser as http://localhost:50062. and asp.NET Dynamic Data Site as http://localhost:58395/cms/. but i want to merge this app. in one. can I use asp.NET ...

How to suppress a compiler warning in C# without using #pragma ?

Hi, I need to suppress a specfic compiler warning in C#. Now I can do it like this: #pragma warning disable 0649 private string _field; #pragma warning restore 0649 Is there a way to do it like the following? [SuppressCompilerWarning("0649")] private string _field; Because I only need to suppress warnings for this field, not a ...

WCF 3.5 to 3.0 backwards compatibility with callback services

I have a set of existing WCF services hosted in a .NET 3.0 app. They're using the WSHttp bindings and no security. I need to connect to these from a .NET 3.5 client. This seems to be working fine for the one-way services, but I also have some callback services (with CallbackContract and SessionMode = Required, using WSDualHttpBinding)...

How to bold text With Compact Framework

I have an app written in C# for the compact framework (3.5). I am trying to display some text on the form in bold. The Label class does not give me the option to bold my text (I can make it bigger, which eventually gives a bold look, but I want my text 12pt and bold. Is this possible? If so How? thanks for any ideas. ...

Protecting DLL's

Hi All Quite a few people have really taken interest in the dll's ivé sent them, and they're not the type that should be given away for free too often... I was just wondering, if I were to sell my components, user controls etc, how would I go about protecting them, in terms of ownership/encrypting code (if possible) etc.. What steps ha...

Select some records ...

I have an IList<MyList>. I'd like with LINQ keep the same list (same number of record) but I'd like reduce or/and rename some record. At the end I'd like to have IList<MyNewList>. Update (Marc Gravell request) We have tools to generate interface/object from Oracle stored procedure. My problem is, for some stored procedure, a lot of fiel...

Password protect web service

Hi! Is it possible to require user name and password for a web service without changing the code for existing web service? Adding a DLL and configuration would be OK, but I rather not change the web service. ...

How to run a django on .Net?

Possible Duplicate: Django on IronPython Is there any demo of the django on .net ? how should i build it in the .net environment? I am chinese ,and it is hard to search in chinese about that.... ...

GDI+ on 64bit systems

Our system uses a lot of large Bitmaps (System.Drawing.Bitmap) and sometimes we run out of memory and gets a "Parameter is not valid" error. This makes sense, since it can be difficult to allocate large continuous chunk of memory. So the question is... If we upgraded the system to 64bit, would this problem go away? ...

Can we run ASP.NET MVC 2.0 on .Net 2.0?

I have an asp.net website which is already developed in .net 3.5, Now I asked to develop few pages in MVC 2.0 and few pages in DynamicData. Now Can I Run the ASP.NET MVC 2.0 and Dynamic Data in 3.5. When I run this i am getting lot of errors in web.config. ...

How can I validate input to the edit control of a cell in a DataGridView?

It appears that the only way to capture the keypress events within a cell of a DataGridView control in order to validate user input as they type, is to use the DataGridView controls OnEditControlShowing event, hook up a method to the edit control's (e.Control) keypress event and do some validation. My problem is that I've built a heap o...

C# ref question again?

class Foo { public int A { get; set; } } class Program { static void Main(string[] args) { var f = new Foo(); var ff = f; Console.WriteLine(f.GetHashCode()); Console.WriteLine(ff.GetHashCode()); FooFoo(ref f); BarBar(f); } private static void BarBar(Foo ...

What does Protected Internal means in .Net

Protected Means, we can access this member only in a deriving class, and internal means we can access this member in any type in the same assembly using a object. So can I consider a Protected Internal member as a public member in the same assembly. and as a protected member in the different assembly. EDIT: namespace pracConsole { ...

How come .net 4.0 and .net 2.0 CLR's can exist in a same machine

I have a basic doubt that, How can we have both CLR's on a same machine. If this is possible, When I refer few dll's of 4.0 and setting application pool to 2.0 why Cant I run the website(I am getting errors).When we refer the dll's from web.config it means it searches for GAC when that particular 4.0 dll is available in GAC Why dont it l...

FB Developer: How do you get emails now?

I'm sure it has already been asked. It's just that every couple of months, facebook changes their APIs and the question becomes new... What is the current way? (I got the user to accept the extended permission thingy). The FB help, claims I have to use getInfo().contact_email which doesn't exist in the .net toolkit. ...

.NET C# setting the value of a field defined by a lambda selector

I have a generic class HierarchicalBusinessObject. In the constructor of the class I pass a lambda expression that defines a selector to a field of TModel. protected HierarchicalBusinessObject (Expression<Func<TModel,string>> parentSelector) A call would look like this, for example: public class WorkitemBusinessObject : Hie...

What it the difference between debug and compile

What is the difference between debug and compile. EDIT: How to compile an application without debugging in visual studio. ...

MyController class must produce class according to the enum type.

GenoTipController must produce class according to the enum type. i have 3 class: _Company,_Muayene,_Radyoloji. Also i have CompanyView Class GetPersonel method. if you look GenoTipController my codes need refactoring. Can you understand me? i need a class according to ewnum type must me produce class. For example; case DataModelType.Rady...

Nested multithread operations tracing

I've a code alike void ExecuteTraced(Action a, string message) { TraceOpStart(message); a(); TraceOpEnd(message); } The callback (a) could call ExecuteTraced again, and, in some cases, asynchronously (via ThreadPool, BeginInvoke, PLINQ etc, so I've no ability to explicitly mark operation scope). I want to trace all operati...