.net-3.5

Can a .NET app that was built against 1.1 be guaranteed to run on any machine with newer versions of .NET?

My new Windows 7 machine for instance doesn't appear to have a .NET installation folder with 1.1 assemblies. Will an app built and targeting 1.1 run without modify this machine with an older distribution of .NET? ...

C#4 features usable while targetting .net 3.5

Possible Duplicate: Is there a list of changes for C#4.0 that work in .Net 3.5? Is there a list of features of C#4 that don't require .NET 4.0? I discovered somewhat on accident that named and and optional parameters work even when targetting .NET 3.5 and I wonder what other C# 4 features I can use. I did a brief search and ...

Controls.remove() method not working in asp.net

I have a web app where the user can create dynamic textboxes at run time. When the user clicks SUBMIT, the form sends data to the database and I want remove the dynamic controls. The controls are created in the following code: Table tb = new Table(); tb.ID = "tbl"; for (i = 0; i < myCount; i += 1) { TableRow tr = new TableRow(...

Entity Framework Security

In my organization, we are just beginning to use the Entity Framework for some applications. In the past, we have pushed developers to utilize stored procedures for all database access. In addition to helping with SQL injection, we tried to grant logins access to stored procedures only to keep security relatively tight. Although inser...

Convert Python 3.x snippet to C#/LINQ.

I want to sort elements of a HashSet<string> and join them by a ; character. Python interpreter version: >>> st = {'jhg', 'uywer', 'nbcm', 'utr'} >>> strng = ';'.join(sorted(s)) >>> strng 'ASD;anmbh;ashgg;jhghjg' C# signature of a method I seek: private string getVersionsSorted(HashSet<string> versions); I can do this without usin...

Removing rows in asp.net

I am attempting to remove rows on my asp.net page using the following code: try { Table t = (Table)Page.FindControl("Panel1").FindControl("tbl"); foreach (TableRow tr in t.Rows) { t.Rows.Remove(tr); } } catch (Exception e) { lblErrorMessage.Text = "Error - RemoveDynC...

VS2010 / Target Framework = 3.5 / Building on Continuous Integration Server

I'm checking into upgrading to VS2010. Our production servers only have 3.5 Framework and it will be 6-9 months before they are updated. We also have a Continuous Integration Server, running CruiseControl.NET (CC.NET). It has the 3.5 Framework on it as well. Our implementation of CC.NET mainly calls msbuild.exe MySolution.msbuild. (We...

RegisterStartupScript not working after upgrading to framework 3.5

I'm trying to upgrade an asp.net c# web project from framework 2.0 to 3.5. When I do this, the client side script that gets written using RegisterStartupScript isn't rendered on the client page. This works perfectly when I compile for 2.0, and for 3.0, but not when I compile for 3.5. Here is the code that isn't getting rendered: Pa...

Email notification when an error occurs

I need to design a bug alert system, where the web support team is notified via email when a user of our website encounters an error of any sort (database exception, or a 404) What would be the best way to design this section of the project? Any ideas would be appreciated. ...

Complex sorting of XML subnodes in .Net3.5 onwards

XML structure expressed in Xpath kind of Records/Record/Actions/Action/ActionDate the other node on the same level Records/Record/Actions/Action/CTCDate Is there easy or not easy way to sort it on "order by ActionDate,CTCDate" ( in SQL notation ), but per Actions for each selected Record ( not per XML file ) when we iterate somehow...

.net 3.5 word.document: how to add image from byte[]

How can one use a byte[] that represents an image to add a picture into an instance of a word.document? I got as far as putting that byte[] into a stream, and the stream to an Image class instance. what should I do next? *without using the clipboard.paste, and without saving into an image file first. ...

Generic cast type to primitive.

Is there a way to do the below? Imagine a generic result wrapper class. Where you have a type and an associated error list. When there is no result to return to the user we will use boolean to indicate success failure. I want to create a constructor that takes in an error list, and if the list is null or count 0, AND the type is a b...

C# Project Global AssemblyInfo

Hi I have .NET 3.5 solution with multiple projects in it. Is there a way I can create a "Global" AssemblyInfo.cs in which all the project AssemblyInfo.cs can reference from? ...

How do you filter a view of a DataTable in .Net 3.5 sp1 using WPF c# and xaml?

I found the MSDN example code for getting the default view of a collection and adding a filter to the view, but most of it is for .Net 4.0. I'm on a team that is not currently switching to 4.0, so I don't have that option. None of the examples I found used a DataTable as the source, so I had to adapt it a little. I'm using a DataTable...

Migrating ASP.NET (MVC 2) on .NET 3.5 over to .NET 4 #gotchas

I've currently got a ASP.NET MVC 2 application on .NET 3.5 and I want to migrate it over to the new .NET 4.0 with Visual Studio 2010. Reason being that it's always good to stay on top of these things - plus I really like the new automatic encoding with <%: %> and clean web.config :-) So, does anyone have any experience they could share...

WCF - calling back to client (duplex ?)

Hi, I have a problem with what solution to choose.. I have a server running having a Service running that can receive orders from a website. To this server several client (remote computers) are connected somehow. I would really like to use WCF for all comunication, but not sure it's possible. I dont wanna configure all client firewall...

toggle the grid cells value, ASP.net 3.5

For my web application, I want a 10*10 (100 cells which is created dynamically) grid to be displayed in the following manner. Initially all the cells' color is green. If i click on any cell its color becomes red if it is green and if i click again it becomes red.(Toggle the cell color) I should be able to display dynamic number of lin...

Compiling ASP.Net 2.0 Application under .Net Framework 3.5 and Compiler reference Problems/errors . Plz Help..

Hi all I am converting an ASP.Net 2.0 Project to compile for .Net Framework 3.5 and facing the following compiler error for assembly reference... InternalXmlHelper.vb(9,0): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. It appears that there are duplicate assembly references one fr...

Detecting webhost server

I have a web app that is using the 3.5 framework. I wanted to know how can I detect what webhost is rendering the page. If the server is localhost, then send email notification to [email protected] If the server is QA, then send email to [email protected] Thanks ...

Using multithreading for loop

Hello, I'm new to threading and want to do something similar to this question: http://stackoverflow.com/questions/100291/speed-up-loop-using-multithreading-in-c-question However, I'm not sure if that solution is the best one for me as I want them to keep running and never finish. (I'm also using .net 3.5 rather than 2.0 as for that qu...