Jul 22, 2010

MD5 Encryption In C#

Encryption generally used for security purpose.
Some times we use this Encryption in Password( because we want to make password as case sensitive,In data base if we store data means, it's not case sensitive, so we want to perform the encryption for provide better security purpose.)

Here I added the MD5 Encryption Program



header files
System.text;
System.security.encryption;
function for Md5
public string encryptpasswordBL(string passwordBO)
    {
        Byte[] originalBytes;
        Byte[] encodedBytes;
        string encryptedPwdBL;
        MD5 md5 = new MD5CryptoServiceProvider();
        originalBytes = ASCIIEncoding.Default.GetBytes(passwordBO);
        encodedBytes = md5.ComputeHash(originalBytes);
        encryptedPwdBL = BitConverter.ToString(encodedBytes);
        return encryptedPwdBL;
    }



Sql connection Using Windows Authentication

sometimes, We get error in sql connection on local machine,this problem occur due to the authentication level of the server(Ms Sql server).

so we trying to open connection by using windows authentication...


SqlConnection conn = new SqlConnection( "Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI");

SSPI to make connection with user's Windows login User ID Name of user configured in SQL Server

Asp.Net with C#



The c# code for Uploading Image using Upload files Controls to specific folder or location in your system or Server folder......




1.you have to add Upload file Control to your form.

2.Add another one submit button on same form.

3.then write following code onClick of Submit button.


Store an Image:

  string systemPath, serverPath, imageUpdate, imageId;
  string Image, ImageUpdate, Userid;
    systemPath = FileUpload1.PostedFile.FileName;
   serverPath =                              System.Web.HttpContext.Current.Server.MapPath("~/Images/");
         FileUpload1.PostedFile.SaveAs(serverPath +  System.IO.Path.GetFileName(systemPath));
         Image = serverPath + System.IO.Path.GetFileName(systemPath);



above program store your files into app_data/images folder

Jul 8, 2010

BEST COMEDY

please go to this link and watch the movie.....
i think he is next super star of india....
please watch it....


http://www.youtube.com/watch?v=oOlVU06Ig0k
http://www.youtube.com/watch?v=HwjszYVHVUA
http://www.youtube.com/watch?v=urN6mrM8iAw

Jun 9, 2010

Kanyakumari




Kanyakumari is the southernmost point of peninsular India and the meeting point of three oceans-the Bay of Bengal, the Arabian Sea and the Indian Ocean.


Kanyakumari:

Kanya kumari has many temples and many tourist places................
world's popular places in kanyakumai