473,398 Members | 2,427 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,398 software developers and data experts.

Image Loading from SQL Server

Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.BinaryWrite but it loads in a new page .I want to load in
a part of my aspx page or in a control (image etc).
Is it possible to load in any grid control?

Thanks in advance
Umeshnath V.G.

Jul 3 '07 #1
5 2293
Hello Umeshnath,

I suppose u need to use ASP.NET AJAX to update your image in page without
updating all page

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

UHi,
UHow can I load a image stored in SQL server database in ASP.NET page.
UI
Uhave used Response.BinaryWrite but it loads in a new page .I want to
Uload in
Ua part of my aspx page or in a control (image etc).
UIs it possible to load in any grid control?
Jul 3 '07 #2
You need to make a separate page GetImage.aspx that will accept an image id
as a query parameter. You will refer to your images like
<img src="GetImage.aspx?id=123" />

The page will get images from the database and stream them down with
Response.BinaryWrite. The images will land into the controls referring them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Umeshnath" <Um*******@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.BinaryWrite but it loads in a new page .I want to load
in
a part of my aspx page or in a control (image etc).
Is it possible to load in any grid control?

Thanks in advance
Umeshnath V.G.

Jul 3 '07 #3
Do you know how to make it work with a usual image ? Do the same and then
change just the image url to point to the page that serves this image.

(the idea is that the control translates to an html img tag that points to
the image location, the image location can be a page that serves an image).

--
Patrice
"Umeshnath" <Um*******@discussions.microsoft.coma écrit dans le message de
news: 51**********************************@microsoft.com...
Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.BinaryWrite but it loads in a new page .I want to load
in
a part of my aspx page or in a control (image etc).
Is it possible to load in any grid control?

Thanks in advance
Umeshnath V.G.

Jul 3 '07 #4
On Jul 3, 2:42 pm, Umeshnath <Umeshn...@discussions.microsoft.com>
wrote:
have used Response.BinaryWrite but it loads in a new page
place your code in SqlImage.aspx and configure your Image Control to
call that page

<asp:Image ImageUrl="SqlImage.aspx"...

Jul 3 '07 #5
http://msdn.microsoft.com/msdnmag/is...ault.aspx?loc=

You may have to google some, but Jeff Prosise puts the "Not So Good" label
on something like this:

<img src=<% SomePage.aspx?ID=123 %>

and suggests using a custom http module:
Find this files in the example listed above:

NorthwindImageGrabber.ashx 1 KB
PictureGridView.aspx 2 KB
PictureGridView.aspx.cs


This was fresh/cool stuff from TechEd2007 FYI.

"Umeshnath" <Um*******@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.BinaryWrite but it loads in a new page .I want to load
in
a part of my aspx page or in a control (image etc).
Is it possible to load in any grid control?

Thanks in advance
Umeshnath V.G.



Jul 3 '07 #6

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

Similar topics

5
by: OneSolution | last post by:
Hi All, Here's what I'm trying to do. I have a diverse customer base, and as it grows, it's increasingly harder to figure out what aspect of our web site is selling and what is not. So I've...
2
by: Mekon | last post by:
I have never written a line of script in my life but I need some help with it now. I have this auto generated code which I want to modify if possible The script generates a strip of...
1
by: Adam Ratcliffe | last post by:
I'm trying to come up with a solution for detecting when an image, loaded by a script, has completely loaded. The Image.onload event is fired after the image has loaded in Firefox but before...
4
by: zborisau | last post by:
Hey good people, I've been given a problem to solve recently - and stuck with the solution for a good 4 days already. i have a link which leads to popup window. the purpose of that popup...
3
by: Jake | last post by:
I am a beginner in C# and web controls. I need a way to load an image which is stored in an Access (mdb) field into an Image control added at runtime. I get the image (jpg format) dynamically at...
4
by: Bruce | last post by:
I have an asp.net page that is dynamically building a table and populating cells with images (typically jpeg) and with associated metadata. How can the asp.net code efficiently determine the...
23
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine...
6
by: sarika | last post by:
Hi All i m making a web site having number of big images. My requirement is i want to dunamically split the images while downloading so that my website works fast and image downloading does not...
3
by: RK | last post by:
Is there an image handling guru out there than can help a newbie with understanding dynamic image creation? The question: I can create an image from within Javascript with MyPic = new Image()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.