.net-3.5

Jmail vs System.Net.Mail

Currently all our projects use jMail. It has been this way since .NET 1.0. Should I start my next project using System.Net.Mail? Are there any advantages that one has over the other or is it just preference? ...

Adding 90000 XElement to XDocument

I have a Dictionary<int, MyClass> It contains 100,000 items 10,000 items value is populated whilst 90,000 are null. I have this code: var nullitems = MyInfoCollection.Where(x => x.Value == null).ToList(); nullitems.ForEach(x => LogMissedSequenceError(x.Key + 1)); private void LogMissedSequenceError(long SequenceNumber) { ...

JavaScriptSerializer().Serialize(Entity Framework object)

May be, it is not so problematic for you. but i'm trying first time with json serialization. and also read other articles in stackowerflow. I have created Entity Framework data model. then by method get all data from object: private uqsEntities _db = new uqsEntities(); //get all data from table sysMainTableColumns where tableName=param...

What's the most simple way to retrieve all data from a table and save it back in .NET 3.5?

I have a number of tables containing some basic (business related) mapping data. What's the most simple way to load the data from those tables, then save the modified values back. (all data should be replaced in the tables) An ORM is out of question as I would like to avoid creating domain objects for each table. The actual editing of...

Handling changes in column order when importing CSV files

I have a CSV file. The first row will always contain column headers. Depending on a variety of factors, the order of columns may change and, in rare circumstances, some columns may not be present. These changes are beyond my control. My thoughts, so far, on how to address this. I'll read the first row of the file and use the values to g...

inserting null values in datetime column and integer column

I am using C# and developing a winform application. I have a project class which has the project attributes. the constructor of the project class is as follows: newProject = new Project(GCD_ID.IsNull() ? (int?)null : Convert.ToInt32(GCD_ID), txt_Proj_Desc.Text, txt_Prop_Name.Text, ST.ID.ToString().IsNull() ? null: ST.ID.ToString(), cmb...

Get the URL(s) from Firefox using C# .NET 3.5

I am writing a .NET 3.5 WPF application in C#. This application needs to be able to get the URL(s) out of the browser window when it is in the foreground. I already have the code working that handles a global Windows hotkey and then checks to see if the foreground IntPtr is from a browser. If so, I am able to obtain the System.Diagnos...

Get selected items from explorer using C# .NET 3.5

I am writing a .NET 3.5 WPF application in C#. This application needs to be able to get the selected items out of Windows explorer when it is in the foreground. I already have the code working that handles a global Windows hotkey and then checks to see if the foreground IntPtr is from explorer. If so, I am able to obtain the System.Diag...

Why do WCF clients depend on the app.config file?

Like a lot of things, I'm sure there's a good reason for this, so please help me understand... Why, by default, do WCF services store settings in app.config? This has been so frustrating trying to work with multiple Silverlight class libraries. These class libraries are supposed to be completely independent from each other, and this de...

log4net not logging with a mixture of .net 1.1 and .net 3.5

Hi All, I have an iis server on a windows 2003 production machine that will not log using log4net in the .net3.5 web application. Log4net works fine in the 1.1 apps using log4net version 1.2.9.0 and but not the 3.5 web app. The logging works fine in a development and staging environment but not in production. It does not error and I ...

ASP.NET MVC Strongly Typed Partial View, gives could not load type error

I am attempting to create a strongly typed view with a "MVC View User Control" that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %> There is nothing else on this page, currently. When ...

How to implement a "Don't show this message again"

In a ASP.NET/JQuery/.NET 3.5 environment, how would I show a DIV with a "Don't show this message again" option when clicked will not show the DIV to the user. I would need to do it in 2 different scenarios - 1 with authenticated users and the other with anonymous users. ...

TryGetValue() in linq expression with anonymous types.

I can't use TryGetValue() from dictionary in linq expression with anonymous type. Dictionary<string, string> dict = new Dictionary<string, string>() { {"1", "one"}, {"2", "two"}, {"3", "three"} }; public string getValueByKey(string value) { string sColumnType = ""; dict.TryGetValue(value, out...

Error deploying CLR udf project in VS - system.core 3.5 not found in SQL catalog

I am building CLR Stored Procedures and UDFs as discussed in this article: http://www.codeproject.com/KB/cs/CLR_Stored_Procedure.aspx When I execute Build > Deploy, I get the following error: Error: Assembly 'system.core, version=3.5.0.0, culture=neutral, publickeytoken=b77a5c561934e089.' was not found in the SQL catalog. N...

Argotic Syndication framework

Is it me or is the documentation for the argotic framework API impossible to find..? The source is available so surely the documented API should be .. Anybody know where this is? Thanks alot, ...

How can I set the maxItemsInObjectGraph property programmatically from a Silverlight Application?

I have a Silverlight 3.0 application that is using a WCF service to communicate with the database, and when I have large amounts of data being returned from the service methods I get Service Not Found errors. I am fairly confident that the solution to it is to simply update the maxItemsInObjectGraph property, but I am creating the servi...

.NET System.Timer Question - Event triggered when Timer.Start() is called?

When a timer's autostart is set to true, does it execute the elapsed event automatically, or just wait for the elapsed interval then executes the event? ...

Problem TreeView OnTreeNodePopulate event

Hi. I am using a treeview in asp.net 3.5(using c#.net),which is populated from sqldatabase. OnTreeNodePopulate event fires this event, protected void tvLabs_TreeNodePopulate(object sender, System.Web.UI.WebControls.TreeNodeEventArgs e) { PopulateSubLevelLab(e.Node.Value, e.Node); //This function is used for populating the child node. Fi...

restricting single user to a windows exe

how can i restrict only single user to a particualr windows exe. ...

Winforms: Enabling Localization by default (enforcing a project/solution policy)

Is there an easy way to set the Localizable property to true for newly created usercontrols / forms? The scope of the setting should ideally be a solution or a project. In other words I want to say that this project/solution should be localizable, and then if I add a new form or control VS should automatically set the property to true....