Need to convert a string to normal datetime format so it can be correctly inserted onto a datetime type field.
String Format:
4/21/2010 4:43:03 PM
Example:
2010-04-21 16:43:03.000
Hello all,
I'm using Enterprise library, but the idea is the same. I have a SqlStringCommand and the sql
is constructed using StringBuilder in the forms of
"insert into table (column1, column2, column3) values (@param1-X, @param2-X, @parm3-X)"+" "
where "X" represents a "for loop" about 700 rows
StringBuilder sb = new StringBuilder();…
Question: I want to call a generic function, defined as:
Public Shared Function DeserializeFromXML(Of T)(Optional ByRef strFileNameAndPath As String = Nothing) As T
Now when I call it, I wanted to do it with any of the variants below:
Dim x As New XMLserialization.cConfiguration
x =…
I'm having a hard time finding information on what I expect to be a pretty straightforward scenario. I'm trying to unit test an Action on my ASP.NET Mvc 2 Controller that utilizes a custom input model w/ DataAnnotions. My testing framework is xUnit, as mentioned in the title.
Here is my…
I have a set of custom ASP.NET server controls, most of which derive from CompositeControl. I want to implement a uniform look for "required" fields across all control types by wrapping each control in a specific piece of HTML/CSS markup. For example:
<div…
This week the data team released the CTP5 build of the new Entity Framework Code-First library. EF Code-First enables a pretty sweet code-centric development workflow for working with data. It enables you to: Develop without ever having to open…
During ASP.NET output caching week in my local blog I wrote about how to measure ASP.NET output cache. As my posting was based on real work and real-life results then I thought that this posting is maybe interesting to you too. So here you can read what I did, how…
Every now and then I see doubts and queries which I believe is the most discussed topic in the .net environment - Asp.net Sessions. So what really are they, why are they needed and what does browser and .net do with it. These and some of the other questions I hope…
Introduction
While developing Developer IT’s website, we came across a problem when the user search keywords containing special character like the plus ‘+’ char. We found it while looking for C++ in our search engine. The request parameter output in ASP.NET was “c…
When parallelizing any routine, we start by decomposing the problem. Once the problem is understood, we need to break our work into separate tasks, so each task can be run on a different processing element. This process is called partitioning.…
Many tasks can be decomposed using a Data Decomposition approach, but often, this is not appropriate. Frequently, decomposing the problem into distinctive tasks that must be performed is a more natural abstraction.
However, as I mentioned in Part 1,…
I recently joined a new development team where the language preferences are mixed on the .net platform.
Dev 1: Knows VB.net, does not know c#
Dev 2: Knows VB.net, does not know c#
Dev 3: Knows c# and VB.net, prefers c#
Dev 4: Knows c# and VB6(VB.net…
On the first part of this article I showed two possible ways to create weak event handlers. One using reflection and the other using a delegate.
For this performance analysis we will further differentiate between creating a delegate by providing the…
I am just back from Microsoft Web Camps, where Web developers in Beijing had a good time for 2 days with 2 fantastic speakers, Scott Hanselman and James Senior.
On day 1, Scott and James talked about Web Platform Installer, ASP.NET core…
I don't know about you, but I find it kind of crazy at times figuring out if I have the latest of everything there is for the Visual Studio 2010 developer from Microsoft. (This does not include any third-party components, just…
Last week we shipped Service Pack 1 of Visual Studio 2010 and the Visual Studio Express Tools. In addition to bug fixes and performance improvements, SP1 includes a number of feature enhancements. This includes improved…
In what situation should I use a Private Set on a property versus making it a ReadOnly property? Take into consideration the two very simplistic examples below.
First example:
Public Class Person
Private _name As String
…
I need to connect to sftp server to download & upload file using C# in .net 3.5. Is Microsoft/.net 3.5 framework providing any inbuilt tools/mechanism/library to connect to sftp server to download & upload files?
Hi,
I need to connect to sftp server to download & upload file using C# in .net 3.5. Is Microsoft/.net 3.5 framework providing any inbuilt tools/mechanism/library to connect to sftp server to download & upload files?
…
I have an ASP.NET page where I have a button When a user clicks on the button,I will check whether the user has logged in or not.If not logged in I will show a modal popup to login (using jQueryUI). I have placed one…
I'm writing myself a class library to manage Active Directory.
I have an interface:
Public Interface ISourceAnnuaire(Of T as {IGroupe, ITop, IUniteOrganisation, IUtilisateur})
Readonly Property Changements As…
What NEW features has WCF in .NET Framework 4 vs .NET Framework 3.5? What Is new, what was fixed (in general - I do not want to get into bug fixed numbers=)?
I have some classic ASP pages showing error all of a sudden.
The error is as follows:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/CustCare/mainwebpage_Midas.asp, line 84
Invalid…