.net-3.5

Using LINQ Group By to return new XElements

I have the following code and got myself confused: I have a query that returns a set of records that have been identified as duplicates and I then want to create a XElement for each one. This should be done in one query I think but I'm now lost. var f = (from x in MyDocument.Descendants("RECORD") where ite...

Entity Data Model & DataGridView - Creating new objects

I'm pretty new to the EDM, so bear with me. I have a windows form that has a DataGridView on it that's bound from the EDM I created. I figured out how to update my changes fine, but it's when the user creates a new row that I'm having a problem. I tried numerous ways and many google searches, but came up with nothing so far. Here's h...

ASP.Net URL rewriting and redirecting....

I am trying to wrap my head around a URL rewrtie / redirect project I need to work on. We currently have this url: www.domain.com/Details/Detail.aspx?param1=8&param2=12345 Here is what the rewritten URL will look like: www.domain.com/Param1/8/Param2/12345 I am using the ISAPI_Rewrite filter to allow for the "nice" url and make the page...

Drawing a WPF UserControl with DataBinding to an Image

Hey Everyone, So I'm trying to use a WPF User Control to generate a ton of images from a dataset where each item in the dataset would produce an image... I'm hoping I can set it up in such a way that I can use WPF databinding, and for each item in the dataset, create an instance of my user control, set the dependency property that corr...

ASP with Crystal Report 9 hangs on .NET framework 3.5

We have an ASP (not ASP.NET) application running on Windows 2003 server. One of the functions of the application is to generate reports using Crystal Report 9. It has been working without any problem with .NET Framework 2.0 and now it is required to install .NET Framework 3.5 SP1 on the server but after we installed the 3.5 SP1, every t...

Satellite assemblies and FullTrust issues when .NET exe is on the network.

I'm executing my .NET app from a network share. Since framework 3.5 SP1, and as explained here: http://blogs.msdn.com/shawnfa/archive/2008/05/12/fulltrust-on-the-localintranet.aspx, the main exe and all the DLLs located in the same folder (but not subfolders) are granted with FullTrust security policy. My problem is that I have subfold...

Can anybody tell me about Generation of Garbage Collector in .net

Can anybody tell me about Generation of Garbage Collector in .net ? ...

Trying to get distinct values from two List<int> objects

I have 2 List objects: List<int> lst1 = new List<int>(); List<int> lst2 = new List<int>(); Let's say they have values: lst1.Add(1); lst1.Add(2); lst1.Add(3); lst1.Add(4); lst2.Add(1); lst2.Add(4); I need to get an object containing the "distinct" list of both of these; so in this case the return would be List {2, 3}. Is there an ...

WCF: I want to use an authentication token like the Google map API. How can I learn more about this?

I want to allow access to a WCF service to only those requests that contain a developer key. This is similiar to how the Google Maps API works. Register for a developer key and include that key in your requests. Anyone can get a key. How you get a key is undecided but is being discussed. For now, we'll email you a key. The service is u...

Download Successful now direct to next page?

I have a page where a text file is downloaded when I button is clicked. When that happens I would then like to direct the user to a confirmation/more details page. I am using visual studio 2008 and it is VB.Net in 3.5 ...

Selective serialization with NetDataContractSerializer

Serializing this class works fine. However, sometimes I'd like to exclude the field. Is this possible? [DataContract] class Foo { [DataMember] Foo _Foo; } Setting the field to null temporarily is impossible. ...

Is there a way to signalize an object its successful deserialization?

I'm using NetDataContractSerializer. After successfully deserializing an object, is there a way to tell the object to finish its construction? I'm thinking along the lines of: [DataContract] class Foo { [DataMember] int i; [SerializationCompletedEvent] void SerializationCompleted () { i = i + 7; } } ...

How to open Excel 2003 using .NET 3.5?

I'd like to open EXCEL 2003 from a .NET 3.5 application and manipulate each cell in the Excel sheet. Any one does that? ...

PropertyGrid + interface

public interface ITest { void Somethink(); } public class Test1 : ITest { public void Somethink() { /* do stuff */ } public int Test1Property { get; set; } } public class Test2 : ITest { public void Somethink() { /* do stuff */ } public float Test2Property { get; set; } } //Main class public class MainClass { [Type...

How can I get a custom made set of checkboxes return values in the postback?

I have the following in an aspx page: <td colspan="2"> <% DisplayParties(); %> </td> In the code behind for the aspx page, i have this (e.g. I build HTML for the checkboxes): public void DisplayParties() { var s = new StringBuilder(); s.Append("<input type=\"checkbox\" id=\"attorney\" value=\"12345\"/>"); s.Append("<i...

How do I change the logged in user to another?

I would like to change the logged in user to another user temporarily to do some process. For example, say I am logged in as "Joe". In my method, I want to make the logged in user from "Joe" to "SuperUser", do some process, then change the logged in user back to "Joe". Can someone help with this? ...

Issues with LINQ (to Entity) [adding records]

I am using LINQ to Entity in a project, where I pull a bunch of data (from the database) and organize it into a bunch of objects and save those to the database. I have not had problems writing to the db before using LINQ to Entity, but I have run into a snag with this particular one. Here's the error I get (this is the "InnerException", ...

How do I call a service from within my Assembly?

I have a C# library. From within it, I want to call a static method that exists within the same library but through Javascript. Can I use WebResource to call a C# method? ...

How to add ServiceReference to an embedded file?

I have a class library. In one of the classes, I am adding a script reference on the page like this: protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (this.Page != null) { ScriptManager sm = ScriptManager.GetCurrent(this.Page); ServiceReference reference =...

How can I use Functions in VB.NET that's not in App_code

I am currently working with an IPhone API which consist of about 40 pages of aspx along with their respective aspx.vb pages. They are all partial classes because the API continues to add other phone platforms to it. Currently I have them residing just in a folder. /API/0.1 and /API/1.0 ... How would I call the functions from those IPho...