.net

Any good .net membership user / group management controls?

I'm looking for any decent .Net membership components which can take the membership prodvider settings from the web.config and display the users / groups on an ASP .Net web page. I have a client requirement to be able to update / create / delete users as well as add / remove them from groups. There must be a decent control set out there...

Whats a good use case for .net 4.0 Expression Trees?

This one was inspired by my language-guru co-worker who can't seem to find a good use for them, and after a few lame attempts of my own, I'd have to agree. Now I know these concepts tend to flow a lot more easily once you get some good practical reasons down. At the moment it seems as though its only purpose is to allow you to write...

SharePoint 2010 My Sites versus custom code for Social Networking / Micro-Blogging

What kind of features does the upcoming SharePoint 2010 have in regards to functionality that is like those found in: FriendFeed, Twitter, Google Wave? Flickr or Digg (tagging and voting)? How much of this do you get "for free" with SP 2010 or would you still have to code it all yourself? Any one know what that have added to My Sites? ...

C# Socket server Ports

Hey, so I'm trying to build a simple lan game using sockets (not tcpclient or tcplistener, and yes I know they are the same thing). I managed to get the chat working, and now I'm trying to get the game to work. I read somewhere that the best way to manage the game data would be through another port on the server (if anyone can suggest a ...

Removing XElements in a foreach loop

So, I have a bug to remove foreach (XElement x in items.Elements("x")) { XElement result = webservice.method(x); if (/*condition based on values in result*/) { x.Remove(); } } The problem is that calling x.Remove() alters the foreach such that if there are two Elements("x"), and the first is removed, the loop d...

SplitContainer & TableLayoutPanel auto sizing problem

I am currently programming my first Windows Forms application using C#. I'm using a TableLayoutPanel that will have a fixed 1X3 table [ 1 | 2 | 3 ], with each cell containing a flow panel that flows top to bottom. I have the row resizing option of the single row in the TableLayoutPanel set to autosize because I want the TableLayoutPanel ...

using libpurple from .NET

Can someone direct me to a code sample of how to use libpurple from .NET? TY ...

Check if an object has focus

How can I tell if a certain textbox has focus or not? I'm writing in C# in .NET. ...

Transparency in composite controls?

I have a composite control that is includes a groupbox control. The problem is it covers the controls that are placed on top of this composite control. Even though I send the new controls to top, so they should be visible, but they aren't. When I just use the groupbox, of course it shows through things so you see the included controls, ...

Can Linq-To-Sql be aware of similarities of two tables?

Imagine I have 2 tables in my database, with the same schema (columns, types, etc). Can Linq-To-Sql treat them as Table<AClass> using the same class for both of them? How to do it? ...

Get GenericType-Name in good format using Reflection on C#

Hello everybody. I need to get the name of generic-type in form of its declaration in code. For example: For List<Int32> I want to get string "List<Int32>". Standart property Type.Name returns "List`1" in this situation. EDIT: example was fixed ...

VB.NET with the UAC

I have an application that sends keystrokes to the computer using sendkeys. This works fine when the user is logged in. However, if a UAC window is open or the user is on the Windows Login screen , the sendkeys doesn't work. My understanding is that the UIPI requires code signing of my application. Can anyone provide me with a complete h...

How to add all controls of another form to a form in Winforms?

I tried using: CoolForm.ActiveForm.Controls but the count returns 0. The main form that is shown is AppForm and has all the controls. I want to add all the controls of CoolForm (which has 1 form) to be added to the main form (AppForm) Is this possible? ...

Getting xml from a dataset

I have a DataSet which has one table loaded with data. When i write out the dataset to xml using the GetXml method of the dataset, i get all the columns in that data table as elements in the xml file. How do i get the resulting xml with the column values as attributes instead of elements? The article here trails off without a proper a...

DataGridViewRow not being Garbage Collected

I have a DataGridView being regularly populated via data-bound objects, and the number of rows can potentially become large, say many thousands during a 'logging cycle'. When a new 'logging cycle' begins, the grid is cleared because the underlying datasource is cleared and the process begins again. This is all fine, but because the pre...

Can asmx services return nothing instead of null?

Hey all, I have a WebService I'm maintaining, running on .Net 2.0. It uses the original "asmx" file standard for a series of web services. In these web services, some objects are returned that have potentially a large number of "null" values. For example: <user id="1" name="foo" job="null" location="null" audience="null" /> This is a...

Changing System.Drawing.Bitmap.Palette

I have a TIFF file in memory, which I obtained by a variant of the following code: Image myImage = Image.FromFile("somefile.tiff"); Currently, myImage.Palette only returns two colors, black and white. I would like to expand this to include the entire color spectrum. However, myImage.Palette does not have a function to add additional ...

Printing in C#/.NET, scaling on a whole page

I am wondering how to do the following ( couldn't get google to help me here ): I got a .jpg file of about 250px*250px in scale.. I want this image on a DIN-A4 page as often as possible I need an "overlay" for every image on the page with a unique code ( lets say a unique barcode for example ) How would i start here? I have really no...

.net extensibility with QTP

I am using QTP v10 and my application is in .Net 3.5. I created the custom server control for TrackBar from the provided document "HP quicktest professional .net add in Extensibility", copied the Configuration.Xml file to SwfConfig file as indicated. Then opened the QuickTest but the test still shows the Click method only and not the Set...

WatiN clear browser cache

It seems the ClearCache method doesn't quite work for IE in WatiN. at least, it doesn't work for things you've cached SINCE you've opened the instance. Any suggestions? I tried using ReOpen, but it errors. It also seems to do the same thing as Browser.Close(); Browser = new IE(); Which is slow. My tests take just about twice as l...