<asp:Image ID="imgpdet" runat="server" Height = 350" Width="350"/>

I want to assign the height and width of the image which is the same of the original image from database .

Actual problem is i have an horizontal and vertical photos , if i give height matching the horizontal photo the vertical photo will be displayed in expanded format.

I believe what you're looking to do is Resize/Resample your images. Please read this article.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.