.net-3.5

Update in asp.net with linq not working

hi everyone I have a strange problem. I am trying to update some fields using linq and it is not working. I tried to build the site and debug it which works and shows that the function is called. I also tried manually adding the values in the code behind file and that works too but somehow on runtime the form doesnt pass the values back...

How can I generate a Bitmap from a winform control?

How can I generate a bitmap of a control on a winform using C#? ...

How do can I attach a Entity Framework object that isn't from the database?

I have a complete separation of my Entity Framework objects and my POCO objects, I just translate them back and forth... i.e: // poco public class Author { public Guid Id { get; set; } public string UserName { get; set; } } and then I have an EF object "Authors" with the same properties.. So I have my business object var auth...

How do I add an object with the entity framework when it has a foreign key object that already exists

I have 2 tables: tblAuthors - id - username tblPosts - id - authorid So if I create a new Post var post = new Post { Id=Guid.NewId(), Author=new Author { UserName="username", Id="id in database } }; The author of the post is already in the database, but the post itself is not... So I want to do: entities.AddToPosts(obj); b...

Call .Net 3.5 WCF service from .Net 2.0 Standard ASMX Web Service Client

I create a service that is host on a server that have .Net 3.5 installed and I need to call this service from a client that only have .Net 2.0 installed Is there a way I can do this ? I'm using c# ...

Outside Property inside a DataTemplate WPF

Scenario: I have a ListBox and the ListBoxItems have a DataTemplate. What I want to do is put a ContextMenu in the DataTemplate. The catch is that I want this ContextMenu ItemsSource to be different depending on certain properties in the window. My initial thought is that I could just bind the ItemsSource to a Property in the window and ...

How do I speed up or remove loading from linqtosql

I have two tables, Transaction and TransactionLineItem that are related through a 1:n relationship (TransactionLineItem has a TransactionKey field that points to the Transaction). I've created the Transaction and exactly 1 TransactionLineItem and posted them to the database. Transaction tran = new Transaction(); context.Transactions.Ins...

Distribution statistics for .net 3.5 Framework

I would like to know on how many end user pc's the .net 3.5 Framework is currently installed (in percent of course). So is there any reliable data source out there? Thanks! Chad ...

Control events not firing after ASP.NET 3.5 conversion

My department is currently converting all of our projects from 2.0 to 3.5, and we are experiencing an odd side effect. It seems that most, if not all, control events aren't firing after we convert the projects to the 3.5 framework. At least not initially. Case in point, I was looking at one of our internal interfaces that had been con...

Sending Data from child form to Parent Form TextBox

I have a Parent Form that holds a "HUD" with First Name, Last Name, etc. One of the child forms is a Search Form. When the user selects a member from the results that are displayed in a DataGrid I want the pertinent information to fill in the HUD. I created a HUD class with variables for each value and a method called UpdateHUD(). I ...

SQL Server 2005 CE 3.5 Re seed IDENTITY

I have inserted some rows into a data table with Set Identity_insert tblEvent on I then attempt to 'reseed' the Identity field int MaxId = this.MaxID()+1; string upgrade = "ALTER TABLE " + Table + " ALTER COLUMN ID IDENTITY("+ MaxId.ToString() +",1)"; System.Data.SqlServerCe.SqlCeCommand cmd = new System.Data.SqlServerCe.SqlCeCommand(...

Smooth movement to ascend through the atmosphere

I'm moving through the atmosphere with Microsoft Virtual Earth 3D and I can descend smoothly, but I don't know the math to ascend smoothly. I'm descending like this: for(int curAlt = startAlt; curAlt < endAlt; curAlt--){ //do something curAlt -= curAlt/150 } This works by decreasing the size of the jump the closer I get to th...

Can you use a .net 3.5 DLL with a .net 2.0 website?

I have some DLLs that it would be much easier to use .net 3.5 internally (to take advantage of Linq, etc). I want to use these DLL with asp.net websites that are currently running asp.net 2.0. Is this scenario possible? Are there any restrictions or gotchas (e.g. asp.net doesn't make any calls to methods which return .net 3.5 objects l...

Access Version Info for Project

I would like to display what version my App is in on the UI. It looks like I set that in Properties --> Application --> Assembler Information. Is that correct? Do I manually increment that upon releases? How do I access that programmatically? Thanks! ...

Fire event when client connects to WCF-hosted endpoint

What do I do in order to fire an event when a new client connects to WCF-hosted service? EDIT: What I'm looking is to get an event when a new session is created or new Channel gets created for a client. Such as: for session closure I'm using: OperationContext.Current.Channel.Closed += new EventHandler( Channel_Closed ); so what shoul...

How do I extend the built in configuration providers in .Net to add custom storage?

We have a configuration XML database. Rather than access this directly through the database API I'd like to extend .Net's configuration classes to add a custom storage provider. I'm not sure where to start. I've seen the Configuration Application Block but this seems to have been deprecated. I'm using .Net 3.5. Which classes should ...

WPF App Fails With System.MissingMethodException

I made a WPF app that uses Web Services. It is failing on all computers except the dev machine with the message -- System.MissingMethodException. I guess the point where it fails is the point where it tried to access the Remote webservice (website). Has anyone had any experience with WPF and webservices? Should I spend 2 more days porti...

How do I capture the current screen as an image?

I want to add the ability for the users to capture the current screen in my app and email it. I have a very non-technical user base so I need this to be as simple as possible. I plan to let them click a menu item called Help Me! which will then capture the current Application Screen, hopefully as a jpg or png, and then open Outlook and...

Can't delete a file from a client after uploading it to the server

I'm using asp:FileUpload control to upload a file to the server. Nothing fancy there, just FileUploadId.Save(); File gets uploaded successfully, and everything is fine until I try to delete that file on the CLIENT. I get a good-old "File is being used by another person or program" message. How do I make sure that file is not being a...

Delete function skipped in asp.net

Hello everyone I am trying to make a page which allows me to delete job applicants from the db. My page works fine but whn i click on the delete button it reloads the page but doesnt delete the applicant and his details. I am using linq. Here is my code <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ApplicantManagement.as...