Sunday, August 18, 2013

Change image image size in asp.net

int len = FileUpload1.PostedFile.ContentLength;
            byte[] picture = new byte[len];

Change color of image - Asp.net

Bitmap bmp = (Bitmap)Bitmap.FromFile("image.jpg");
for (int x = 0; x < bmp.Width; x++)
{
    for (int y = 0; y < bmp.Height; y++)
    {
        if (bmp.GetPixel(x, y) == Color.Red)
        {
            bmp.SetPixel(x, y, Color.Blue);
        }
    }
}
pictureBox1.Image = bmp;

Google Chat Back Badge

<div style=”position: fixed; bottom: 0px; right: 0px; width: 200px; height: 60px; z-index: 9000;”>   <iframe src="http://www.google.com/talk/service/badge/Show?tk=z01...6r&w=200&h=60" frameborder="0" width="200" height="60"></iframe> </div>

Google Search

 string s1 = TextBox1.Text;
        string s2 = s1.Replace(' ', '+').ToString(); ;
        string s3 = "http://www.google.co.uk/search?hl=en&q=" + s2 + "&meta=";

 Response.Redirect(s3);