.net

How to Change TabPage Position in C#.NET?

I have six tabs on my Windows application. I need to put tab #6 after tab #2, how can i do it? I couldn't drag the tab to the location i want! The 5 tabs are full of controls that took long time to name and design. Any idea how to move last tab and place it after 3rd tab? ...

What does the Microsoft.WebApplication.targets import do in VS 2010 web application projects?

Visual Studio 2010 seems to insist on having this import in web application projects <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> What does this import give us and is it really required? On a side note if you remove this import with a text editor Visual ...

linq2sql and multiple joins

is it possible to do multiple joins: from g in dataContext.Groups join ug in dataContext.UsersGroups on g.Id equals ug.GroupId join u in dataContext.Users on u. where ug.UserId == user.Id select GroupRepository.ToEntity(g); in the sample above all is fine until i press "." in the end of the 3rd line. there i expect to get intellisense...

How do I get a bucket by name in the .Net S3 SDK?

I'm trying to find a method using the Amazon S3 SDK for .Net to get a bucket by its name. All I can find is ListAllBuckets(), but I really don't want to have to do that then try to find it from the response. ...

How do I respond to a specific sequence of key presses?

The end result is very simple, I have to have something happen when a user types in the letter "n" "o" "t" "e" in that order. 'Note' is the word. I'm making a little application for a friend that will help him take notes, and I want my application to become visible when he types in "note" from anywhere on the machine. Here's what I've ...

WCF and streaming requests and responses

Is it correct that in WCF, I cannot have a service write to a stream that is received by the client? Streaming is supported in WCF for requests, responses, or both. I would like to support a scenario where the data generator (either the client in case of streamed request, or the server in case of streamed response) can Write on the st...

Can I get an XPathNodeIterator directly from an XPath?

I hope I'm just missing something obvious. I have a number of repeating nodes in an XML document: <root> <parent> <child/> <child/> </parent> </root> I need to examine the contents of each of the <child> elements in turn, so I need an XPathNodeIterator containing the nodeset of all the <child> nodes. If I have an XPath th...

Visual studio 2010 setup project problem.

Hi there, I've made an application that uses .NET framework 3.5 SP1 and SQL Server 2008 Express. Application is fine and now i'm going to to make a setup project for this. When I first build my setup it was fine as all the prerequisites were not included in setup. But I want my setup to install .NET 3.5 SP1 and SQL SERVER 2008 Express...

WPF: Can't get to original source from ExecutedRoutedEventArgs

I have a problem getting to the original source of a command using ExecutedRoutedEventArgs. I'm creating a simple splitbutton, in which a menu will appear below a dedicated button, as another button is pressed. When I click a menuitem in the appearing menu a command is fired. This command is registered on the splitbutton. And the idea i...

Fluent Nhibernate napping to existing database with primary key in joining table of a many to many relationship

I have an existing database with a many to many relationship however the joining table has a primary key ID and 2 foreign keys to do the join. Is it possible to configure the mapping files to handle this? at the moment i am stuck. Thanks ...

How to insert all records into a table only one time

Hello, I want to get all records from a table1 & insert them into table2. Table1 & table2 are in different databases, table1 and table2 are same structure. Normally, I will get all records from table1, and for each record (foreach), I will insert it into table2 by using "INSERT ...". I want to know a effect way to insert all records int...

Security errror while accessing WCF Service thru flex application

There is flex app accessing dot net web service (WCF) . Both are hosted in the same machine(Server). The web service wsdl is accessible via browser. Tried accessing the service thru dot net application it works perfect , but when I try accessing the service using the flex applicationI get a error . (FaultEvent fault=[RPC Fault faultS...

Delete Registry Root folder

i have to create one root folder in current config. I'm storing some value in this root folder. i can delete the values in this root folder. but i cannot delete the root folder. ...

Gridview inside a ModalPopUpExtender causes ModalPopUpExtender to close

I have a gridview inside a ModalPopUpExtender, the grid view have the button add delete and edit when i clic one of the button of the gridview the popup is closed. I wont to close the popup when the close button is clicked. This is the asp.net part: < cc1: ModalPopupExtender ID="NamePopup" runat="server" PopupControlID="OptionPanel" T...

Registration during Setup/Install packages

Is it possible to register a .NET component during the installation of a VB6 app? Is it also possible to grant security (eg. via CAPSOL) as part of an installation package? Will InnoSetup do this? ...

Question about C# 4.0's generics covariance

Having defined this interface: public interface IInputBoxService<out T> { bool ShowDialog(); T Result { get; } } Why does the following code work: public class StringInputBoxService : IInputBoxService<string> { ... } ... IInputBoxService<object> service = new StringInputBoxService(); and this doesn't?: public class I...

How to upgrade a VB6 app with .NET components

I want to make a change to a VB6 app which consists of a .EXE, no VB6 DLLs but a handful of .NET DLLs. The interop is achieved by a one of the .NET dlls being referenced by the VB6 app which seems to require REGASM-ing of an associated .tlb file. If I want to change only the VB6 app .exe, could I just compile it and drop it into the ...

.NET TCPListener limitation ?

Hi all, I have a question about the usage of TCPListener in .NET... I am thinking about a client/server application and being new to this kind of application I have search a bit around the web and the solution which come the more often is to create a new thread for each new client connection. This solution seem fine but I was wondering...

Get User SID From Logon ID (Windows XP and Up)

I have a Windows service that needs to access registry hives under HKEY_USERS when users log on, either locally or via Terminal Server. I'm using a WMI query on win32_logonsession to receive events when users log on, and one of the properties I get from that query is a LogonId. To figure out which registry hive I need to access, now, I n...

How to mark certain methods in WCF silverlight enabled service?

I have WCF silverlight enabled service. I have some methods in it. I need to mark certain methods in service and then to determine them when I have get all methods of service by Reflection. MethodInfo[] methods = typeof(TypeOfTheService).GetMethods(); ...