Building HTML Emails With SQL Server and XML

This is an interesting and useful article that explains how to convert sql query results to html format

http://www.sqlservercentral.com/blogs/robert_davis/archive/2010/06/15/Bu...

Thanks to the author Robert

Best Date Validation in Javascript

function isDate(value) {
var dateRegEx = new RegExp(/^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);

if (dateRegEx.test(value)) {
return true;
}
return false;
}

Not sure who wrote. Whoever it is thank you very much.

Best Jquery Keypress Numeric validation Plugin

After some couple of hours of search I found the best Jquery keypress Numeric validation.

http://brianjaeger.com/process.php

This is a neatly written plugin. Thanks to the author.

Tags:

ASP.Net Disable Submit button onclick after page validation

The below code will Disable Submit button onclick after page validation

string var = ClientScript.GetPostBackEventReference(btnSubmit, "").ToString();
btnSubmit.Attributes.Add("onClick", "javascript :if ( Page_ClientValidate() ){this.disabled=true; this.value='Please Wait...';" + var + "};");

Tags:

itextsharp, C# working with images

This is a great article on working with images using itextsharp and C#

http://www.mikesdotnetting.com/Article/87/iTextSharp-Working-with-images

GPG4Win Command line

Use this command line to decrypt using gpg4win commandline gpg.exe

echo yourpassphrase|gpg.exe --batch --yes --passphrase-fd 0 -o "d:\outputfile.txt" --decrypt "d:\outputfile.txt.gpg"

Options
--batch: Use batch mode. Never ask, do not allow interactive commands.
--passphrase-fd n: Read the passphrase from file descriptor n. If you use 0 for n, the passphrase will be read from stdin. This can only be used if only one passphrase is supplied.
-o: output file name
--decrypt: decrypt file name

Tags:

How to change database name dynamically in Crystal Report

I had a crystal report which is called within C# to generate a pdf file.

While deploying i had to change the db name. How to change the database name without changing the database info in the report itself

This will not work: repDoc.SetDatabaseLogon(db_username, db_password, server_name, database_name);

Use this       

    repDoc.Load(repFilePath);

Welcome to sourcecodezone.com

Trying again with Drupal 7. Let's see how this goes.

Subscribe to sourcecodezone.com RSS