473,396 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Text below an image

Hi all,

Im gonna display a list of images in an aspx page from sql server Db.Each
image has a link.When someone clicks the image i want the width and size of
the image to be displayed at the bottom of the image without any coding at
code-behind because the resulting page will display only the image.

Rajesh
Jan 19 '06 #1
9 2242
Dan
"i want the width and size of the image to be displayed at the bottom of the
image ..."

"...the resulting page will display only the image"

Please explain? What is it you are asking?

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
Hi all,

Im gonna display a list of images in an aspx page from sql server Db.Each
image has a link.When someone clicks the image i want the width and size
of
the image to be displayed at the bottom of the image without any coding at
code-behind because the resulting page will display only the image.

Rajesh

Jan 19 '06 #2
Alright , Say we have this image link
http://www.theserverside.net/article...rovider/Creati
ngProfileProvider.gif
What do you see? Just an image right?.
In my situation the image is in the form of a binary file inside sql server
database.Now i retreive and display say 10 images.When i click an image it
goes to another page that displays the image say like the link i showed u
above.Now under this image i want to a text to be displayed showing me the
width and size of the image.
Still not clear?

"Dan" <dv*******@aol.com> wrote in message
news:uC*************@TK2MSFTNGP12.phx.gbl...
"i want the width and size of the image to be displayed at the bottom of the image ..."

"...the resulting page will display only the image"

Please explain? What is it you are asking?

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
Hi all,

Im gonna display a list of images in an aspx page from sql server Db.Each image has a link.When someone clicks the image i want the width and size
of
the image to be displayed at the bottom of the image without any coding at code-behind because the resulting page will display only the image.

Rajesh


Jan 19 '06 #3
Dan
So the question is.

How do you display the width/height dimensions of an image?

Wouldnt that be easier, but maybe this is due to a language barrier so i
apologise if that is the reason.

Use System.Drawing.Image class. Load your image in and then retrieve the
width/height attributes.

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:ew*************@tk2msftngp13.phx.gbl...
Alright , Say we have this image link
http://www.theserverside.net/article...rovider/Creati
ngProfileProvider.gif
What do you see? Just an image right?.
In my situation the image is in the form of a binary file inside sql
server
database.Now i retreive and display say 10 images.When i click an image it
goes to another page that displays the image say like the link i showed u
above.Now under this image i want to a text to be displayed showing me the
width and size of the image.
Still not clear?

"Dan" <dv*******@aol.com> wrote in message
news:uC*************@TK2MSFTNGP12.phx.gbl...
"i want the width and size of the image to be displayed at the bottom of

the
image ..."

"...the resulting page will display only the image"

Please explain? What is it you are asking?

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
> Hi all,
>
> Im gonna display a list of images in an aspx page from sql server Db.Each > image has a link.When someone clicks the image i want the width and
> size
> of
> the image to be displayed at the bottom of the image without any coding at > code-behind because the resulting page will display only the image.
>
> Rajesh
>
>



Jan 19 '06 #4
Dan,
You are getting it wrong . Did you see the image link i gave??
or say you click this link
http://www.google.com/logos/Logo_25wht.gif
The width and hieght should be displayed below that image

"Dan" <dv*******@aol.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
So the question is.

How do you display the width/height dimensions of an image?

Wouldnt that be easier, but maybe this is due to a language barrier so i
apologise if that is the reason.

Use System.Drawing.Image class. Load your image in and then retrieve the
width/height attributes.

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:ew*************@tk2msftngp13.phx.gbl...
Alright , Say we have this image link
http://www.theserverside.net/article...rovider/Creati ngProfileProvider.gif
What do you see? Just an image right?.
In my situation the image is in the form of a binary file inside sql
server
database.Now i retreive and display say 10 images.When i click an image it goes to another page that displays the image say like the link i showed u above.Now under this image i want to a text to be displayed showing me the width and size of the image.
Still not clear?

"Dan" <dv*******@aol.com> wrote in message
news:uC*************@TK2MSFTNGP12.phx.gbl...
"i want the width and size of the image to be displayed at the bottom
of the
image ..."

"...the resulting page will display only the image"

Please explain? What is it you are asking?

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
> Hi all,
>
> Im gonna display a list of images in an aspx page from sql server

Db.Each
> image has a link.When someone clicks the image i want the width and
> size
> of
> the image to be displayed at the bottom of the image without any
coding at
> code-behind because the resulting page will display only the image.
>
> Rajesh
>
>



Jan 19 '06 #5
Hi

try the following code and let me know

<html>
<head>
<script>
function CheckImageSize()
{
var imgObj = document.getElementById("img1");

document.getElementById("det").innerText = "Width : " + imgObj.width + "
Height : " + imgObj.height
}
</script>
</head>
<body onload="CheckImageSize()">
<table>
<tr>
<td>
<img id="img1"
src="http://www.theserverside.net/articles/content/CreatingProfileProvider/CreatingProfileProvider.gif" border="0">
<br>
<span id="det"></span>
</td>
</tr>
</table>
</body>
</html>

"Rajesh" wrote:
Hi all,

Im gonna display a list of images in an aspx page from sql server Db.Each
image has a link.When someone clicks the image i want the width and size of
the image to be displayed at the bottom of the image without any coding at
code-behind because the resulting page will display only the image.

Rajesh

Jan 19 '06 #6
Dan
Hi Rajesh,

Your really not making sense so this is the last post i will try since i
cant help. Amazed the option of 'maybe i am not being clear' hasn't occurred
just that i am getting it wrong. Perhaps coder arrogance is why you can't
solve a very simple problem?

You want to write the width and height of your image when loaded from a sql
server db underneath the image.

So you have a picture and underneath its dimensions.

Now when i said you want to retrieve the image width/height i just didnt add
that you want to write them out to the screen ( i assumed this would be
obvious once you had it).

Anyway use the code i gave before and get the image from your sql server db,
load it from there into the image class.

Then use that class to give you the width and height then Response.Write it
out to the page under the image. That will give you an image and underneath
it the dimensions printed.

I am using the code behind. If you dont want to then go javascript way as
the other person posted and do it client side.

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
Hi all,

Im gonna display a list of images in an aspx page from sql server Db.Each
image has a link.When someone clicks the image i want the width and size
of
the image to be displayed at the bottom of the image without any coding at
code-behind because the resulting page will display only the image.

Rajesh

Jan 19 '06 #7
Or you could use this:

<html>
<script>
function setImgPlaceHolder(){
oDiv=document.getElementById("imgPlaceHolder");
oDiv.innerHTML=oDiv.innerHTML + '<br>' + oDiv.children[0].width + ' x
' + oDiv.children[0].height;
}
</script>
<body onload="setImgPlaceHolder();">
<div id="imgPlaceHolder" style="position:relative;text-align:center;
font-weight:bold;">
<img src="http://www.google.com/logos/Logo_25wht.gif">
</div>
</body>
</html>

Jan 19 '06 #8
KMA
Actually, I think he got it right. He didn't supply pastable code, but the
hint is spot on. when you come to place the link on the page, open the file
yourself (in server code, I mean; not you personally) using the class
indicated, then find out the information you want and output to your page an
additional piece of text with this information. The net result will be a
link followed by the text showing the dimentions.

"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Dan,
You are getting it wrong . Did you see the image link i gave??
or say you click this link
http://www.google.com/logos/Logo_25wht.gif
The width and hieght should be displayed below that image

"Dan" <dv*******@aol.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
So the question is.

How do you display the width/height dimensions of an image?

Wouldnt that be easier, but maybe this is due to a language barrier so i
apologise if that is the reason.

Use System.Drawing.Image class. Load your image in and then retrieve the
width/height attributes.

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:ew*************@tk2msftngp13.phx.gbl...
> Alright , Say we have this image link
> http://www.theserverside.net/article...rovider/Creati > ngProfileProvider.gif
> What do you see? Just an image right?.
> In my situation the image is in the form of a binary file inside sql
> server
> database.Now i retreive and display say 10 images.When i click an image it > goes to another page that displays the image say like the link i showed u > above.Now under this image i want to a text to be displayed showing me the > width and size of the image.
> Still not clear?
>
>
>
> "Dan" <dv*******@aol.com> wrote in message
> news:uC*************@TK2MSFTNGP12.phx.gbl...
>> "i want the width and size of the image to be displayed at the bottom of > the
>> image ..."
>>
>> "...the resulting page will display only the image"
>>
>> Please explain? What is it you are asking?
>>
>> --
>> Dan
>> "Rajesh" <bh***************@tenth-planet.com> wrote in message
>> news:eY**************@TK2MSFTNGP10.phx.gbl...
>> > Hi all,
>> >
>> > Im gonna display a list of images in an aspx page from sql server
> Db.Each
>> > image has a link.When someone clicks the image i want the width and
>> > size
>> > of
>> > the image to be displayed at the bottom of the image without any coding > at
>> > code-behind because the resulting page will display only the image.
>> >
>> > Rajesh
>> >
>> >
>>
>>
>
>



Jan 19 '06 #9
Dan,

Thanks for everything but this is what they asked me in an interview from
Microsoft thats the reason why i couldnt paste any code out here for you
guys to know what im asking.

Raj

"Dan" <dv*******@aol.com> wrote in message
news:ew**************@TK2MSFTNGP15.phx.gbl...
Hi Rajesh,

Your really not making sense so this is the last post i will try since i
cant help. Amazed the option of 'maybe i am not being clear' hasn't
occurred just that i am getting it wrong. Perhaps coder arrogance is why
you can't solve a very simple problem?

You want to write the width and height of your image when loaded from a
sql server db underneath the image.

So you have a picture and underneath its dimensions.

Now when i said you want to retrieve the image width/height i just didnt
add that you want to write them out to the screen ( i assumed this would
be obvious once you had it).

Anyway use the code i gave before and get the image from your sql server
db, load it from there into the image class.

Then use that class to give you the width and height then Response.Write
it out to the page under the image. That will give you an image and
underneath it the dimensions printed.

I am using the code behind. If you dont want to then go javascript way as
the other person posted and do it client side.

--
Dan
"Rajesh" <bh***************@tenth-planet.com> wrote in message
news:eY**************@TK2MSFTNGP10.phx.gbl...
Hi all,

Im gonna display a list of images in an aspx page from sql server Db.Each
image has a link.When someone clicks the image i want the width and size
of
the image to be displayed at the bottom of the image without any coding
at
code-behind because the resulting page will display only the image.

Rajesh


Jan 19 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: styler | last post by:
I am having difficulty with the page located here: http://tinyurl.com/2zwa9 I am creating a number of image sets (some left-, some right-aligned; an example of the right-aligned is shown the...
9
by: steven | last post by:
Hi, I can float the image left or right so the text will float around it, but only if the top of the image is aligned with the start of the paragraph. I'd like the image be a little below that, so...
12
by: who be dat? | last post by:
I'm trying to make a webpage do the following: I want a user to be able to click on a given image (there will be more than one image). Upon clicking a given image, characters specific to that...
1
by: larzeb2000 | last post by:
I am a beginner having difficulty placing text which is hot below an image, with the text centered horizontally with the image. I have tried background-image and can get the text above the image,...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
8
by: DarkSaturn | last post by:
Is there a method of using the CSS float command on images to contain itself within a single paragraph? The problem I'm running into is trying to use float images on a listing page, I have an...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
6
by: bradyounie | last post by:
I'm writing a program that displays a user-supplied Bitmap and then writes text fields to it. These "text fields" are things that the user can move around on the image, but to render them...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.