.net-3.5

Calling .Net webservice with Jquery is causing woe when trying to post data

The following code executes properly when the data key has no data to send, i.e. data: "{}" an empty JSON object and the webservice takes no parameters. I would like to post some data to the webservice but I am running into trouble. When I try to set this to data:"{'name':'Niall','surname':'Smith'}", I get an error {"Message":"Invalid...

Change WinForms combo box selection with UI Automation

Hi, is it possible to change the selected item in a winforms application using c# UI automation (same logic as UIspy.exe)? I would like to change the selected item to a specific item (I know it's index/position in the list). ...

How do you determine if two HashSets are equal (by value, not by reference)?

I am trying to determine if two HashSet objects in .NET 3.5 (C#) are equal sets, i.e. contain the same values. This seems like something one would obviously want to do but none of the provided functions seem to give you this information. The way I can think to do this is by checking if the count of the two sets are equal and one set is ...

How to hide mdi child forms in c#.net?

I want code for hiding multiple child forms in MDI. whenever i click child form it must be in front.other forms will automatically hide. How can i do this? pls any one reply me. Thanks in advance ...

When do you need the Windows SDK for MSBuild?

I'm setting up my first build server for .NET 3.5 projects, and found this interesting line in the MSBuild log after a successful build of a simple test application: Could not locate the expected version of the Microsoft Windows SDK. Looked for a location specified in the "InstallationFolder" value of the registry key "HKEY...

How will .NET 3.5 SP1 impact my .NET 1.1 applications?

If I have a number of existing applications written and deployed w/ .NET 1.1, is there any risk to installing .NET 3.5 SP1 on the servers? My understanding is that .NET 3.5 SP1 only works with the .NET 2.0 codebase, so it will not touch or affect my .NET 1.1 applications. Can you also point me to any pertinent MSDN documentation? I've...

LINQ - Is it possible with dynamic LINQ to dynamically specify the from clause?

Hi I want to build dynamic linq. But I want to dynamically set the table (from clause) Is this possible? Malcolm ...

LinqToSQL - no supported translation to SQL

Hi, I have been puzzling over a problem this morning with LinqToSQL. I'll try and summarise with the abbreviated example below to explain my point. I have DB two tables: table Parent { ParentId } table Child { ChildId ParentId [FK] Name Age } These have LinqToSQL equivalent classes in my project, however, I have writ...

How would you build a HttpTraceListener?

Hello all, My application uses the Trace object to log information. The information is captured in a file with the TextWriterTraceListener and it works perfectly. However, I would like to add another TraceListerner which will record the information to a Web Service. In other words, I need an HttpTraceListener. Moreover, I need something...

CommandParameters in ContextMenu in WPF

I have a scenario where I have a WPF TreeView control that has an HierarchicalDataTemplate for its items. Now inside the HierarchicalDataTemplate, I have a Label and the Label has a ContextMenu with a menuitem for Delete. The Delete menuitem is binded with a Command called DeleteCommand which is a part of the class that has been set as t...

Adding a horizontal separator in a MenuStrip

I can't seem to find any way to add a horizontal separator in a MenuStrip. Visual Studio complains Cannot add ToolStropSeparator to MenuStrip. Any idea's how I can do this? Thanks. ...

Binding Textboxes

I have been binding textboxes in a winform with C# to a dataset. Whenever the data doesn't validate with what the database except it silently forces the focus to remain on the textbox. How can I catch the validation error and tell the user about it (and free the focus)? The BindingSource event OnDataError isn't fired. ...

Asp.net 1.1 to 3.5 migration problems

Hi, We had an asp.net 1.1 application that we recently migrated to 3.5. We are facing some problems when we do code modification on the migrated application. Here is what is happening In the asp.net 1.1 application we have the page directive codebehind="ePC.aspx.cs". This migrated fine. We made some code changes to the .cs file. Sa...

How to get design surface rendering and design time datasource selection with an asp.net user control

If I create a user control (EDIT:not a web control/server control) it's pretty trivial to get databinding. I just add a datasourceID property. In code behind (vb) Partial Public Class BandedControl Inherits UserControl Public Property DataSourceID() As String Get Return MyGridView.DataSourceID End ...

Linq - Row not found or changed

I have the following code: Guid id = imageMetaData.ID; Data.LinqToSQL.Image dbImage = DBContext.Images.Where(x => x.ID == id).SingleOrDefault(); dbImage.width = imageMetaData.Width; dbImage.height = imageMetaData.Height; DBContext.SubmitChanges(); Looking at SQL Profiler, the following SQL is...

.NET 3.5 GridView - Select multiple rows with Control key press

Hi, I am working on a .NET 3.5 web application and i am using GridView. I want to select multiple rows when the user presses control key and clicks on the row. If the clicks without pressing control key i want to do only single row selection. How to check whether user has pressed Control key in javascript and highlight all the selec...

.Net Static Methods and it's effects on Concurrency ?

I am currently building an API which will be used by a webservice. I was wondering what performance issues I could meet if I built my API using a large amount of static methods. The original idea was to build expert objects which act as services. In a single user environment this approach was great! But I will soon need to port this...

Linq-to-sql One-To-Many with a max

I'm having a heck of a time with this one. Might be the lack of sleep... or maybe I'm just getting dumb. I have 2 tables: a) Person {Key, Name, LastName} b) LogEntry {Key, PersonKey, Log, EntryTime} I'm trying to get a join of Person and LogEntry where LogEntry is the latest LogEntry for the given Person. I hope I don't go "duh..." i...

Unable to cast object of type 'X' to type 'X' - ASP.NET.

I am currently working with a ASP.NET Web site project in Visual Studio 2008 and everytime I make a change to code behind page for a user control and browse to page that is using the user contorl I get the following error: Unable to cast object of type 'ASP.basepage_master' to type 'ASP.basepage_master'. I have to rebuild my en...

WPF Toolkit Datagrid with .Net 3.5 no sp1

I've been trying to use the WPF toolkit in a WPF application that I'm deploying internally at my company, but the toolkit needs .Net 3.5 sp1. The only difference between sp0 and sp1 for the toolkit is the MultiSelector class that the datagrid uses. My question is, does anybody know of a workaround for this so sp1 isn't required? Is ther...