25.2.10

Sql Functions

NOLOCK

http://www.sqlservercentral.com/Forums/Topic282321-149-1.aspx
http://www.sqlservercentral.com/articles/Performance+Tuning/2764/


http://www.1keydata.com/sql/sql-use.html

SQL WILD CARDS:
http://www.techonthenet.com/sql/like.php

http://www.w3schools.com/SQL/sql_wildcards.asp


The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation you need to
COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.

TRUNCATE removes all rows from a table. The operation cannot be rolled back. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.

The DROP command removes a table from the database. All the tables' rows,
indexes and privileges will also be removed. The operation cannot be rolled back.

DROP and TRUNCATE are DDL commands, whereas DELETE is a DML command. Therefore DELETE operations can be rolled back (undone), while DROP and TRUNCATE operations cannot be rolled back.
********************************************************
TURN IMPLICIT TRANSACTION ON IN SQL:

http://blog.techdreams.org/2007/11/implicit-transactions-onoff-sql-server.html

http://www.allinterview.com/showanswers/71598.html

23.2.10

Send Mail through php(Hypertext Preprocessor)

http://www.w3schools.com/php/php_mail.asp

BCC,CC--
http://www.java2s.com/Code/Php/Form/SendemailwithCCandBCC.htm

21.2.10

Send mail when Error occur in website

http://www.plugins4asp.net/tipsdetails.aspx?ID=50

http://dotnetguts.blogspot.com/2007/10/error-handling-in-net-with-example.html

http://www.mastercsharp.com/article.aspx?ArticleID=61&&TopicID=2

Session Expire in 20 minutes or 2 minute

http://forums.asp.net/t/1283350.aspx
http://forums.asp.net/p/1332460/2676515.aspx
http://stackoverflow.com/questions/648992/session-timeout-in-asp-net


1.)http://www.velocityreviews.com/forums/t95194-go-to-login-page-when-session-expires.html

2.)http://zeeshanumardotnet.blogspot.com/2009/01/why-dot-net-sessions-are-cleared-before.html

3.)http://zeeshanumardotnet.blogspot.com/2009/07/why-sessions-are-terminatedloss.html

Validation of Mac failed

http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx

1.)http://www.andreas-kraus.net/blog/validation-of-viewstate-mac-failed/

2.)http://www.pagedowntech.com/faq/faq.asp?faqid=145

3.)http://www.eukhost.com/forums/f15/fix-validation-viewstate-mac-failed-6085/

20.2.10

Set a table’s visibility to false when it has no rows (in reporting services)

http://stackoverflow.com/questions/514043/set-a-tables-visibility-to-false-when-it-has-no-rows-in-reporting-services

18.2.10

Database Mirroring in SQL Server 2008

1.)Database Mirroring in SQL Server 2008

http://www.databasejournal.com/features/mssql/article.php/3828341/Database-Mirroring-in-SQL-Server-2008.htm

****************************************************************
2.)Replication in SQL Server 2008

http://www.databasejournal.com/features/mssql/article.php/3820361/Peer-to-Peer-Replication-in-SQL-Server-2008--Add-a-node-and-resolve-conflict.htm

*****************************************************************
3.)get day from datetime
DATENAME ( datepart ,date )
http://msdn.microsoft.com/en-us/library/ms174395(SQL.90).aspx

******************************************************************
4.) Delete temp data from pc shortcut
run type:%temp%

Red gate for sql

http://www.red-gate.com/

Server Demo

https://demo.discountasp.net/news.aspx

16.2.10

validation in input upload

script type="text/javascript"
function Checkfiles(f){
f = f.elements;
if(/.*\.(gif)|(jpeg)|(jpg)|(doc)$/.test(f['filename'].value.toLowerCase()))
return true;
alert('Please Upload Gif or Jpg Images, or Doc Files Only.');
f['filename'].focus();
return false;
};

form action="#" onsubmit="return Checkfiles(this);"
input type="file" name="filename"
input type="submit" value="Go!"

http://www.dynamicdrive.com/forums/archive/index.php/t-37439.html

Download file code

// Get the physical Path of the file(test.doc)
string filepath = Server.MapPath("File/Demo.txt");

// Create New instance of FileInfo class to get the properties of the file being downloaded
FileInfo file = new FileInfo(filepath);

// Checking if file exists
if (file.Exists)
{
// Clear the content of the response
Response.ClearContent();

// LINE1: Add the file name and attachment, which will force the open/cance/save dialog to show, to the header
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);

// Add the file size into the response header
Response.AddHeader("Content-Length", file.Length.ToString());

// Set the ContentType
Response.ContentType = ReturnExtension(file.Extension.ToLower());

// Write the file into the response (TransmitFile is for ASP.NET 2.0. In ASP.NET 1.1 you have to use WriteFile instead)
Response.TransmitFile(file.FullName);

// End the response
Response.End();
}

******************************************************************************8
private string ReturnExtension(string fileExtension)
{
switch (fileExtension)
{
case ".htm":
case ".html":
case ".log":
return "text/HTML";
case ".txt":
return "text/plain";
case ".doc":
return "application/ms-word";
case ".tiff":
case ".tif":
return "image/tiff";
case ".asf":
return "video/x-ms-asf";
case ".avi":
return "video/avi";
case ".zip":
return "application/zip";
case ".xls":
case ".csv":
return "application/vnd.ms-excel";
case ".gif":
return "image/gif";
case ".jpg":
case "jpeg":
return "image/jpeg";
case ".bmp":
return "image/bmp";
case ".wav":
return "audio/wav";
case ".mp3":
return "audio/mpeg3";
case ".mpg":
case "mpeg":
return "video/mpeg";
case ".rtf":
return "application/rtf";
case ".asp":
return "text/asp";
case ".pdf":
return "application/pdf";
case ".fdf":
return "application/vnd.fdf";
case ".ppt":
return "application/mspowerpoint";
case ".dwg":
return "image/vnd.dwg";
case ".msg":
return "application/msoutlook";
case ".xml":
case ".sdxl":
return "application/xml";
case ".xdp":
return "application/vnd.adobe.xdp+xml";
default:
return "application/octet-stream";
}





}

15.2.10

Multiple Image Upload

http://www.asp.net/learn/videos/video-253.aspx

http://www.codeproject.com/KB/aspnet/FlashUpload.aspx

8.2.10

Iphone Integration in windows Os ( Asp.net c#)

http://forums.whirlpool.net.au/forum-replies-archive.cfm/1120070.html

http://shelastyle.net/blog/developing-for-iphone-with-c/
**********************************************************

http://monodevelop.com/Download



http://blog.testlabs.com/2009/09/hello-monotouch-net-and-c-developement.html

5.2.10

Projects

http://www.hjcode.com/FreeASPProjects.html

XML(EXtensible Markup Language.) SERIALIZATION

http://vinbhat.wordpress.com/2008/08/19/exporting-data-creating-xml-files-using-c/

*****************************************************************************
http://www.stjhimy.com/2009/10/17/playing-around-with-xmls-and-xsds-net-smiles-for-you/

****************************************************************************


http://www.switchonthecode.com/tutorials/csharp-tutorial-xml-serialization
***
XmlSerializer serializer = new XmlSerializer(typeof(DES.DES));
TextWriter textWriter = new StreamWriter(_fileName);
serializer.Serialize(textWriter, objdes);
textWriter.Close();
*********************************************************************
http://www.csharper.net/blog/serializing_without_the_namespace__xmlns__xmlns_xsd__xmlns_xsi_.aspx
***
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
using (XmlWriter writer = XmlWriter.Create(_fileName, settings))
{
XmlSerializer serializer = new XmlSerializer(typeof(DES.DES));

XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();

namespaces.Add("", "http://www.mto.gov.on.ca/rus/des/batch-input");

serializer.Serialize(writer, objdes, namespaces);
}