XSLT - HTML Format shown as it is in Result

XSLT Element

The <xsl:value-of> element element extracts the value of a selected node.

The <xsl:value-of> element can be used to select the value of an XML element and add it to the output.

Note: The value of the required select attribute contains an XPath expression. It works like navigating a file system where a forward slash (/) selects subdirectories.

Syntax

<xsl:value-of
select="expression"
disable-output-escaping="yes|no"/>
Attributes


1. select - expression - Required. An XPath expression that specifies which node/attribute to extract the value from.


2. disable-output-escaping yes/no - Optional - "yes" indicates that special characters (like "<") should be output as is. "no" indicates that special characters (like "<") should be output as "<". Default is "no"
In Database I have HTML Code - but when using XSLT it return the code as it is



in XSL(T) add the script <xsl:value-of disable-output-escaping="yes" select="TDesc"/>

you will get correct result

Example / I faced an issue

XML

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="../XSL/JavaScript.xsl"?>
<catalog>
<cd>
<title>
Pra<b>thee</b>skumar</title>
<artist>Vijayakanth</artist>
</cd>
</catalog>

XSL

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<xsl:for-each select="catalog/cd">
<xsl:value-of disable-output-escaping="yes" select="title"/>
<br />
<xsl:value-of select="title"/>
<br/>
<xsl:value-of select="artist"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Result

Pratheeskumar
Pra<b>thee</b>skumar
Vijayakanth

Connect Facebook

Connect Facebook

Retrieve Top n Records Per Group

Retrieve Top n Records Per Group

SELECT
DiscussionTopPosts.PostID
From (
SELECT p.DiscussionID, p.PostID, ROW_NUMBER() OVER (PARTITION BY p.DiscussionID ORDER BY p.DateCreated DESC) AS RowNumber
FROM Posts p
WHERE
p.DiscussionID IN
(
SELECT d.DiscussionID
FROM Discussions d
Where myCondition
)
AND p.IsActive = 1
GROUP BY p.DiscussionID, p.PostID, p.DateCreated
)
DiscussionTopPosts
WHERE
DiscussionTopPosts.RowNumber <= @NumberOfPosts

XSL transform from string to string

Example code to do XSL transform from string to string

XPathDocument doc = new XPathDocument(new StringReader(inputXML));
XslTransform xslt = new XslTransform();
xslt.Load(whatever);
StringWriter sw = new StringWriter();
xslt.Transform(doc, null, sw);

The resulting string is in sw.ToString().

C# to VB.NET

C# to VB.NET

Wokflow

WCF

New Feature of C#.net 3.0

DateTime.ToString() Patterns

All the patterns:

0MM/dd/yyyy08/22/2006
1dddd, dd MMMM yyyyTuesday, 22 August 2006
2dddd, dd MMMM yyyyHH:mm Tuesday, 22 August 2006 06:30
3dddd, dd MMMM yyyyhh:mm tt Tuesday, 22 August 2006 06:30 AM
4dddd, dd MMMM yyyyH:mm Tuesday, 22 August 2006 6:30
5dddd, dd MMMM yyyyh:mm tt Tuesday, 22 August 2006 6:30 AM
6dddd, dd MMMM yyyy HH:mm:ssTuesday, 22 August 2006 06:30:07
7MM/dd/yyyy HH:mm08/22/2006 06:30
8MM/dd/yyyy hh:mm tt08/22/2006 06:30 AM
9MM/dd/yyyy H:mm08/22/2006 6:30
10MM/dd/yyyy h:mm tt08/22/2006 6:30 AM
10MM/dd/yyyy h:mm tt08/22/2006 6:30 AM
10MM/dd/yyyy h:mm tt08/22/2006 6:30 AM
11MM/dd/yyyy HH:mm:ss08/22/2006 06:30:07
12MMMM ddAugust 22
13MMMM ddAugust 22
14yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK2006-08-22T06:30:07.7199222-04:00
15yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK2006-08-22T06:30:07.7199222-04:00
16ddd, dd MMM yyyy HH':'mm':'ss 'GMT'Tue, 22 Aug 2006 06:30:07 GMT
17ddd, dd MMM yyyy HH':'mm':'ss 'GMT'Tue, 22 Aug 2006 06:30:07 GMT
18yyyy'-'MM'-'dd'T'HH':'mm':'ss2006-08-22T06:30:07
19HH:mm06:30
20hh:mm tt06:30 AM
21H:mm6:30
22h:mm tt6:30 AM
23HH:mm:ss06:30:07
24yyyy'-'MM'-'dd HH':'mm':'ss'Z'2006-08-22 06:30:07Z
25dddd, dd MMMM yyyy HH:mm:ssTuesday, 22 August 2006 06:30:07
26yyyy MMMM2006 August
27yyyy MMMM2006 August

The patterns for DateTime.ToString ( 'd' ) :

0MM/dd/yyyy08/22/2006

The patterns for DateTime.ToString ( 'D' ) :

0dddd, dd MMMM yyyyTuesday, 22 August 2006

The patterns for DateTime.ToString ( 'f' ) :

0dddd, dd MMMM yyyy HH:mmTuesday, 22 August 2006 06:30
1dddd, dd MMMM yyyy hh:mmtt Tuesday, 22 August 2006 06:30 AM
2dddd, dd MMMM yyyy H:mmTuesday, 22 August 2006 6:30
3dddd, dd MMMM yyyy h:mmtt Tuesday, 22 August 2006 6:30 AM

The patterns for DateTime.ToString ( 'F' ) :

0dddd, dd MMMM yyyy HH:mm:ssTuesday, 22 August 2006 06:30:07

The patterns for DateTime.ToString ( 'g' ) :

0MM/dd/yyyy HH:mm08/22/2006 06:30
1MM/dd/yyyy hh:mmtt 08/22/2006 06:30 AM
2MM/dd/yyyy H:mm08/22/2006 6:30
3MM/dd/yyyy h:mm tt08/22/2006 6:30 AM

The patterns for DateTime.ToString ( 'G' ) :

0MM/dd/yyyy HH:mm:ss08/22/2006 06:30:07

The patterns for DateTime.ToString ( 'm' ) :

0MMMM ddAugust 22

The patterns for DateTime.ToString ( 'r' ) :

0ddd, dd MMM yyyy HH':'mm':'ss 'GMT'Tue, 22 Aug 2006 06:30:07 GMT

The patterns for DateTime.ToString ( 's' ) :

0yyyy'-'MM'-'dd'T'HH':'mm':'ss2006-08-22T06:30:07

The patterns for DateTime.ToString ( 'u' ) :

0yyyy'-'MM'-'dd HH':'mm':'ss'Z'2006-08-22 06:30:07Z

The patterns for DateTime.ToString ( 'U' ) :

0dddd, dd MMMM yyyy HH:mm:ssTuesday, 22 August 2006 06:30:07

The patterns for DateTime.ToString ( 'y' ) :

0yyyy MMMM 2006 August

Building a custom DateTime.ToString Patterns

The following details the meaning of each pattern character. Not the K and z character.

dRepresents the day of the month as a number from 1 through 31. A single-digit day is formatted without a leading zero
ddRepresents the day of the month as a number from 01 through 31. A single-digit day is formatted with a leading zero
dddRepresents the abbreviated name of the day of the week (Mon, Tues, Wed etc)
ddddRepresents the full name of the day of the week (Monday, Tuesday etc)
h12-hour clock hour (e.g. 7)
hh12-hour clock, with a leading 0 (e.g. 07)
H24-hour clock hour (e.g. 19)
HH24-hour clock hour, with a leading 0 (e.g. 19)
mMinutes
mmMinutes with a leading zero
MMonth number
MMMonth number with leading zero
MMMAbbreviated Month Name (e.g. Dec)
MMMMFull month name (e.g. December)
sSeconds
ssSeconds with leading zero
tAbbreviated AM / PM (e.g. A or P)
ttAM / PM (e.g. AM or PM
yYear, no leading zero (e.g. 2001 would be 1)
yyYear, leadin zero (e.g. 2001 would be 01)
yyyYear, (e.g. 2001 would be 2001)
yyyyYear, (e.g. 2001 would be 2001)
KRepresents the time zone information of a date and time value (e.g. +05:00)
zWith DateTime values, represents the signed offset of the local operating system's time zone from Coordinated Universal Time (UTC), measured in hours. (e.g. +6)
zzAs z but with leadin zero (e.g. +06)
zzzWith DateTime values, represents the signed offset of the local operating system's time zone from UTC, measured in hours and minutes. (e.g. +06:00)
fRepresents the most significant digit of the seconds fraction; that is, it represents the tenths of a second in a date and time value.
ffRepresents the two most significant digits of the seconds fraction; that is, it represents the hundredths of a second in a date and time value.
fffRepresents the three most significant digits of the seconds fraction; that is, it represents the milliseconds in a date and time value.
ffffRepresents the four most significant digits of the seconds fraction; that is, it represents the ten thousandths of a second in a date and time value. While it is possible to display the ten thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
fffffRepresents the five most significant digits of the seconds fraction; that is, it represents the hundred thousandths of a second in a date and time value. While it is possible to display the hundred thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
ffffffRepresents the six most significant digits of the seconds fraction; that is, it represents the millionths of a second in a date and time value. While it is possible to display the millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
fffffffRepresents the seven most significant digits of the seconds fraction; that is, it represents the ten millionths of a second in a date and time value. While it is possible to display the ten millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
FRepresents the most significant digit of the seconds fraction; that is, it represents the tenths of a second in a date and time value. Nothing is displayed if the digit is zero.
:Represents the time separator defined in the current DateTimeFormatInfo..::.TimeSeparator property. This separator is used to differentiate hours, minutes, and seconds.
/Represents the date separator defined in the current DateTimeFormatInfo..::.DateSeparator property. This separator is used to differentiate years, months, and days.
"Represents a quoted string (quotation mark). Displays the literal value of any string between two quotation marks ("). Your application should precede each quotation mark with an escape character (\).
'Represents a quoted string (apostrophe). Displays the literal value of any string between two apostrophe (') characters.
%cRepresents the result associated with a c custom format specifier, when the custom date and time format string consists solely of that custom format specifier. That is, to use the d, f, F, h, m, s, t, y, z, H, or M custom format specifier by itself, the application should specify %d, %f, %F, %h, %m, %s, %t, %y, %z, %H, or %M. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
        \c Represents the escape character, and displays the character "c" as a literal when that 

character is preceded by the escape character (\). To insert the backslash character itself in

the result string, the application should use two escape characters ("\\").



Any other character copies any other character to the result string, without affecting formatting. ||


.NET Framework Tools 

The .NET Framework tools are designed to make it easier for you to create, deploy, and manage applications and components that target the .NET Framework. This section contains detailed information about the tools.
You can run all the tools from the command line with the exception of the Assembly Cache Viewer (Shfusion.dll) and the Microsoft CLR Debugger (DbgCLR.exe). You must access Shfusion.dll from Microsoft Windows Explorer. DbgCLR.exe is located in the Microsoft.NET\FrameworkSDK\GuiDebug folder.

Important noteImportant Note:

For the .NET Framework tools to function properly, you must set your Path, Include, and Lib environment variables correctly. Set these environment variables by running SDKVars.bat, which is located in the <SDK>\v2.0\Bin directory. SDKVars.bat must be executed in every command shell.


Configuration and Deployment Tools

Tool

Description

ASP.NET Compilation Tool (Aspnet_compiler.exe)

Allows an administrator to precompile an ASP.NET application, either in place or for deployment.

ASP.NET Browser Registration Tool (Aspnet_regbrowsers.exe)

Allows an administrator to create new browser definitions.

ASP.NET IIS Registration Tool (Aspnet_regiis.exe)

Allows an administrator or installation program to update the scriptmaps for an ASP.NET application to point to the ASP.NET ISAPI version associated with the tool. You can also use the tool to perform other ASP.NET configuration operations.

ASP.NET Merge Tool (Aspnet_merge.exe)

Allows an administrator to combine and manage assemblies that are created by the ASP.NET Compilation Tool.

ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe)

Allows an administrator to create and manage SQL Server databases used for ASP.NET services such as membership, roles, and profile properties.

Assembly Cache Viewer (Shfusion.dll)

Allows you to view and manipulate the contents of the global assembly cache using Windows Explorer.

Assembly Linker (Al.exe)

Generates a file with an assembly manifest from one or more files that are either resource files or Microsoft intermediate language (MSIL) files.

Assembly Registration Tool (Regasm.exe)

Reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently.

Assembly Binding Log Viewer (Fuslogvw.exe)

Displays details for failed assembly binds. This information helps you diagnose why the .NET Framework cannot locate an assembly at run time.

CorFlags Conversion Tool (CorFlags.exe)

Allows you to configure the CorFlags section of the header of a portable executable image.

Global Assembly Cache Tool (Gacutil.exe)

Allows you to view and manipulate the contents of the global assembly cache and download cache. While Shfusion.dll provides similar functionality, you can use Gacutil.exe from build scripts, makefile files, and batch files.

Installer Tool (Installutil.exe)

Allows you to install and uninstall server resources by executing the installer components of a specified assembly.

Isolated Storage Tool (Storeadm.exe)

Lists or removes all existing stores for the currently logged-on user.

Manifest Generation and Editing Tool (Mage.exe) andManifest Generation and Editing Tool, Graphical Client (MageUI.exe)

Supports the creation and editing of application and deployment manifests.

Native Image Generator (Ngen.exe)

Creates a native image from a managed assembly and installs it in the native image cache on the local computer.

.NET Framework Configuration Tool (Mscorcfg.msc)

Provides a graphical interface for managing .NET Framework security policy and applications that use remoting services. This tool also allows you to manage and configure assemblies in the global assembly cache.

.NET Services Installation Tool (Regsvcs.exe)

Adds managed classes to Windows 2000 Component Services by loading and registering the assembly and generating, registering, and installing the type library into an existing COM+ 1.0 application.

Type Library Exporter (Tlbexp.exe)

Generates a type library from a common language runtime assembly.

Type Library Importer (Tlbimp.exe)

Converts the type definitions found within a COM type library into equivalent definitions in managed metadata format.

Debugging Tools

Tool

Description

Runtime Debugger (Cordbg.exe)

Provides command-line debugging services using the common language runtime Debug API. Used to find and fix bugs in programs that target the runtime.

SOS Debugging Extension (SOS.dll)

Provides the debugging services of the common language runtime to Visual Studio or the WinDbg.exe debugging tool.

.NET Framework Command-Line Debugger (MDbg.exe)

Provides command-line debugging services using the common language runtime Debug API.

Security Tools

Tool

Description

Certificate Creation Tool (Makecert.exe)

Generates X.509 certificates for testing purposes only.

Certificate Manager Tool (Certmgr.exe)

Manages certificates, certificate trust lists (CTLs), and certificate revocation lists (CRLs).

Certificate Verification Tool (Chktrust.exe)

Verifies the validity of a file signed with an X.509 certificate. The Certificate Verification tool only ships with the .NET Framework SDK version 1.0 and 1.1. In later versions, use the Sign Tool (SignTool.exe) utility instead.

Code Access Security Policy Tool (Caspol.exe)

Allows you to examine and modify machine, user, and enterprise-level code access security policies.

File Signing Tool (Signcode.exe)

Signs a portable executable (PE) file with an Authenticode digital signature. The File Signing Tool only ships with the .NET Framework SDK version 1.0 and 1.1. In later versions, use the Sign Tool (SignTool.exe) utility instead.

Permission Calculator Tool (Permcalc.exe)

Estimates the permissions callers must be granted to access the public entry points of an assembly.

Permissions View Tool (Permview.exe)

Displays the minimal, optional, and refused permission sets requested by an assembly. You can also use this tool to view all declarative security used by an assembly.

PEVerify Tool (PEverify.exe)

Performs MSIL type safety verification checks and metadata validation checks on a specified assembly.

Policy Migration Tool (Migpole.exe)

Migrates security policy between two compatible versions of the .NET Framework.

Secutil Tool (Secutil.exe)

Extracts strong name public key information or Authenticode publisher certificates from an assembly, in a format that can be incorporated into code.

Set Registry Tool (Setreg.exe)

Allows you to change the registry settings for the Software Publishing State keys, which control the behavior of the certificate verification process. The Set Registry tool only ships with the .NET Framework SDK version 1.0 and 1.1. In later versions, use the Sign Tool (SignTool.exe) utility instead.

Sign Tool (SignTool.exe)

Digitally signs files, verifies signatures in files, and time stamps files.

Software Publisher Certificate Test Tool (Cert2spc.exe)

Creates, for test purposes only, a Software Publisher's Certificate (SPC) from one or more X.509 certificates.

Strong Name Tool (Sn.exe)

Helps create assemblies with strong names. Sn.exe provides options for key management, signature generation, and signature verification.

General Tools

Tool

Description

Code Generation Tool (SqlMetal.exe)

Generates code and mapping for the LINQ to SQL component of the .NET Framework.

License Compiler (Lc.exe)

Reads text files that contain licensing information and produces a .licenses file that can be embedded in a common language runtime executable.

Management Strongly Typed Class Generator (Mgmtclassgen.exe)

Allows you to quickly generate an early-bound class in C#, Visual Basic, or JScript for a specified Windows Management Instrumentation (WMI) class.

MSIL Assembler (Ilasm.exe)

Generates a PE file from Microsoft intermediate language (MSIL). You can run the resulting executable, which contains MSIL code and the required metadata, to determine whether the MSIL code performs as expected.

MSIL Disassembler (Ildasm.exe)

Takes a PE file that contains MSIL code and creates a text file suitable as input to the MSIL Assembler (Ilasm.exe).

Resource File Generator Tool (Resgen.exe)

Converts text files and .resx (XML-based resource format) files to .NET common language runtime binary .resources files that can be embedded in a runtime binary executable or compiled into satellite assemblies.

SDK Command Prompt

Automatically sets the environment variables that allow you to easily use the .NET Framework tools.

Windows Forms ActiveX Control Importer (Aximp.exe)

Converts type definitions in a COM type library for an ActiveX control into a Windows Forms control.

Windows Forms Class Viewer (Wincv.exe)

Finds managed classes matching a specified search pattern, and displays information about those classes using the Reflection API.

The Windows Forms Class Viewer only ships with the .NET Framework SDK version 1.0 and 1.1.

Windows Forms Resource Editor (Winres.exe)

Allows you to quickly and easily localize Windows Forms forms.