473,785 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Binary Write 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 2312
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.Binary Write 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.a spx?id=123" />

The page will get images from the database and stream them down with
Response.Binary Write. 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*******@disc ussions.microso ft.comwrote in message
news:51******** *************** ***********@mic rosoft.com...
Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.Binary Write 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*******@disc ussions.microso ft.coma écrit dans le message de
news: 51************* *************** **...icrosof t.com...
Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.Binary Write 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...@disc ussions.microso ft.com>
wrote:
have used Response.Binary Write 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="SqlIm age.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?I D=123 %>

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

NorthwindImageG rabber.ashx 1 KB
PictureGridView .aspx 2 KB
PictureGridView .aspx.cs


This was fresh/cool stuff from TechEd2007 FYI.

"Umeshnath" <Um*******@disc ussions.microso ft.comwrote in message
news:51******** *************** ***********@mic rosoft.com...
Hi,
How can I load a image stored in SQL server database in ASP.NET page. I
have used Response.Binary Write 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
2720
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 been trying to use PHP (and/or ASP) to do some research on my customers. So I nosed around some web sites and found the following piece of code. <IMG
2
2391
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 thumbnails, and works quite well execpt that on dial up it is unbearably slow. The Thumbnails themselves are only 10kb but the total of them is a lot larger. and it appears to need to load them all before it will display any.
1
10208
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 loading has completed in Internet Explorer. The function where I assign the onload event handler looks like this: var newImage = new Image(); function getImage(url) { var image = document.getElementById("theImg");
4
44092
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 window is to redirect user to the one of available servers. so i need to check which server is available. i have decided to download some 1pixel image from every server and if it was downloaded
3
2863
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 runtime then I create an Image control (from WebControls collection) and add it to the page also at runtime. The ImageUrl property needs a URL string but I only have the image itself extracted with a data RecordSet (recordset for example.) Can...
4
2414
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 pixel resolution from the image file (without loading the entire image into memory on the server) to allow it to properly size the table cell and its associated Image control? Thanks, Bruce
23
5940
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 on most machines, on some machines I experience this problem: When loading the page a window pops up that asks if I want to open the document show_page.asp. When I click "Open" Interdev pops up and opens up a
6
4911
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 not much time. I need a script in php for doing this. Please help me .Your help will be highly appreciated.
3
2893
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() ....and then assign a source with MyPic.src = "./picture.gif";
0
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10096
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.