.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

why image look different, in different browser and monitor resolution too

Posted By:      Posted Date: October 17, 2010    Points: 0   Category :ASP.Net

Check out my sample.

Default.aspx Page :-

1.	<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>  
3.	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
5.	<html xmlns="http://www.w3.org/1999/xhtml" >  
6.	<head runat="server">  
7.	    <title>Untitled Page</title>  
8.	    <link href="css/main.css" rel="stylesheet" type="text/css" />  
9.	</head>  
10.	<body>  
11.	    <form id="form1" runat="server">  
13.	    <div>  
14.	    <ul class="mainMenu" style="text-align: center">  
15.	          <li style="text-align: center"><a href="xxx.aspx"><span style="font-family: Palatino Linotype"><strong>Home</strong></span></a><span  
16.	           style="font-family: Palatino Linotype"><strong> </strong></span>  
17.	          </li>  
18.	          <li style="text-align: center"><a href="xxx.aspx">

View Complete Post

More Related Resource Links

Display XAML workflow image in browser and hightlight the current Activity

I have a requirement in project to display the XAML workflow in browser as image like the Visual studio designer displaying and it should Hightlight the current activity in workflow.  Please guide me on this.rajeevkalyan

Render Image from FileUpload on Browser




I am developing a .Net Page that will contain a FileUpload box so a user can upload images to the site. I would like the functionality that when someone chooses a file to upload (before they actually upload the file), they can preview it on the browser. I know I can do this through some javascript magic, but is there anything that can be done using AJAX tools to gain this functionality. Thanks for any help that you can come up with.



Converting windows form to bmp - image crops when the screen resolution is changed


I am converting windows form to a bitmap file using   DrawToBitmap method.  My code looks like this.

            Dim wid As Integer = 760 '  Me.Width
            Dim hgt As Integer = 780 ' Me.Height
            Dim bm As New Bitmap(wid, hgt)
            Me.DrawToBitmap(bm, New Rectangle(0, 0, wid, hgt))
            bm.Save(CurDir() & "\sample.bmp")

This code work fine on desktop/laptop with the screen resolution 1024 x 768  or above.   If I use app on a table pc – with the screen resolution is 800 x 480, the image gets cropped. 
Any suggestion or alternate mode.


Uploaded Image is Not Display In Mozila Browser....



I have written code to upload image to server and save it database as below,

Dim path As String
        If FileUpload1.FileName <> "" Then
            path = Server.MapPath("product_photo" & "\" & FileUpload1.FileName)
        End If
        Dim objdatabase As New database
        Dim objdataset As New DataSet
        Dim cmd As New SqlCommand
        Dim objadapter As SqlDataAdapter

        cmd.Connection = objdatabase.con
        cmd.CommandType = CommandType.StoredProcedure
        cmd.CommandText = "sp_in_Insert_product"
        cmd.Parameters.Add("@pr_name", SqlDbType.VarChar).Valu

image not showing on browser


Hi Friends i m developing a website in asp.net. my web site is working fine but i m getting a problem with images. My web sites images are showing properly. Some time they come in first time, some time in second refresh. but when i refresh page some current showing images are start not showiing so each time my web page miss some images on ramdom base.

Please help me

thanks in advance .

Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Program for Format Conversion of An Image

.NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF.

Configuring Profile Image Export in SharePoint 2010

It's no secret that I am thrilled with the new social features of SharePoint 2010. I am most excited about the new Profile Picture handling. I strongly believe that the more we can show the faces of our colleagues to one another the more connected we will feel. Clearly Microsoft feels that way as witnessed by the many features that make use of the Profile Image like the Activity Feed and Colleagues list

Built-in Functions - Text and Image Functions

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

ASP.Net Upload Image to MS Access Database

As you learnt from the previous articles to upload image to the SQL Database in ASP.Net 2.0 and stream that image into the memory to retrieve it from the database and display it on the web page. In this article you will learn how to upload images to the MS Access database in ASP.Net 2.0

First of all create an Access Database and place it in the App_Data folder of ASP.Net web site project. Then create a table "tblImg" with the following fields:

How to setup a Mobile Browser Emulator in Windows Mobile 6:

In the following tutorial, I cover the process of Setting up Windows Mobile 6 for Mobile Browser Emulation using the Microsoft Device Emulator. This enables a user to experience Windows Mobile 6 on a PC via Emulation without even owning a Windows Mobile 6 product. It can be a great way to test drive Windows Mobile 6 before purchasing a product with it installed. In our case, it allowed us to Emulate Windows Mobile Browsing so that we could optimize our sites for the Mobile viewing audience. Installation and Emulation is simple and fairly straight forward.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

*.axd script references not being rendered to browser


I'm running VS2010 with .net 4.0, and am running into issues with the .net ajax script tags mysteriously not being rendered to the browser.

So far I've reduced it to a scenario where I set the DataSourceID property of a databound control.  More specifically, I've only tested it on a Gridview and a DropDownList.

This can be reproduced fairly easily on my machine by following these steps:

1. Create a new empty Web Application Project

2. Create a new Web Form

3. Add a ScriptManager inside the form

4. Add a DropDownList and a DataSource (I used an ObjectDataSource)

5. Set the DataSourceID property of the DropDownList to the ID of the DataSource.  This can be done either declaratively on the .aspx page, or in the code behind in the aspx.cs page, and both produce the same results.

6. Open the page in a browser and watch as you get a javascript error stating "Sys is not defined" and notice that the page source contains no script tags referencing *.axd scripts.

Here's my source code showing my set up:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ScriptResourceFAIL.Default" %>


slideshow image gallary using jQuery



i need a gallary like following link.


actually,i bound multiple image in a gridview using handler(.ashx).

for example,in one dep_id(1),there are 6 image and i need to slideing one by one.

could some one help me,how i can do like this?

i think is it easy in jquery.

please someone help me.

Thanking you.

datalist image slide show problem


hi friends

i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

for example pls go through my code below:

<script type="text/javascript">
$(document).ready(function() {
        fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

<div class="slideshow">
        <img src="images/30_dummy.jpg" width="200" height="200" />
        <img src="images/aquarius.gif" width="200" height="200" />
        <img src="images/star.gif" width="200" height="200" />
        <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />

I above code works perfectly and the slide show e

Setting Screen Resolution



  I am developing a website in asp.net.How can i make my web pages view same in different screen resolutions.I am using 1024*768 resolution

WebDev.WebServer.exe has encounted a problem and needs to close when trying to view page in browser


Hi, whenever I load an aspx page in vwde2008, I get the message in the subject of this post.  After I click Ok on that, I get a dialog box, Unable to Connect to the ASP.Net development center.  What can I do to troubleshoot?

I am using Windows XP SP3, vwde2008 with SP1, on a HP desktop.  Also using Office 2003 if that is relevant at all.

Thanks, Justin

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend