Skip to main content

Posts

Showing posts from August, 2009

ASP.net ListView

The following examples give an overview of how to use ListView.
Simple ListView

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JL.aspx.cs" Inherits="JL" %>
<%@ Register Assembly="SystemCore.CommonAppControls" Namespace="SystemCore.CommonAppControls" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ListView ID="ListView1" runat="server"> <LayoutTemplate> <asp:PlaceHolder ID="itemPlaceholder" runat="server" /> </LayoutTemplate> <I…

SSIS package throwing "the type initializer for 'System.Data.SqlClient.SqlConnection'

SSIS package throwing "the type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception"
I'm running SSIS package which references an assembly which calls a WCF web service. Everytime i run it, i get this weird "the type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception".
So i decided to check on app.config setting in the following files located in C:\Program Files\Microsoft SQL Server\90\DTS\Binn folder.
a) DTExec.exe.config
b) DtsDebugHost.exe.config
c) dtshost.exe.config
It has nothing to do with these configurations.
Solution
Try installing Microsoft .Net Framework 3.0 (in my case) and it solve my issue.