Monday, October 24, 2011

What is the basic difference between ASP and ASP.NET?

The basic difference between ASP and ASP.NET is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).

Thursday, October 20, 2011

Good link for .net Interview Quetions & Answers

http://indiabix.com/

http://p2p.wrox.com/net-framework-2-0/31636-dot-net-interview-questions-answers.html

Tuesday, October 18, 2011

Flip Horizontally in asp.net with c#

.aspx
--------
   <asp:Button ID="btflip" runat="server" Text="flip" onclick="btflip_Click" />

 .aspx.cs
---------

 protected void btflip_Click(object sender, EventArgs e)
    {
        // get the full path of image url
        string path = Server.MapPath(Image1.ImageUrl);

        // creating image from the image url
        System.Drawing.Image i = System.Drawing.Image.FromFile(path);

        // rotate Image 180' Degree
        i.RotateFlip(RotateFlipType.Rotate180FlipY);

        // save it to its actual path
        i.Save(path);

        // release Image File
        i.Dispose();

        // Set Image Control Attribute property to new image(but its old path)
        Image1.Attributes.Add("ImageUrl", path);

    }



Rotation in asp.net with c#

lib
----
using System.Drawing;


Default.aspx
-------------

 <asp:Image ID="Image1" runat="server" Height="297px"
            ImageUrl="~/images/Winter.jpg" Width="343px" />

<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
            Text="Rotate Image" />


Default.aspx.cs
----------------

   protected void Button1_Click(object sender, EventArgs e)
    {
        // get the full path of image url
        string path = Server.MapPath(Image1.ImageUrl);

        // creating image from the image url
        System.Drawing.Image i = System.Drawing.Image.FromFile(path);

        // rotate Image 90' Degree
        i.RotateFlip(RotateFlipType.Rotate90FlipXY);

        // save it to its actual path
        i.Save(path);

        // release Image File
        i.Dispose();

        // Set Image Control Attribute property to new image(but its old path)
        Image1.Attributes.Add("ImageUrl", path);

    }