473,408 Members | 1,809 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,408 software developers and data experts.

Bitmap as a Image web control

Ben
Hi Ya,

quick question for you. Im a little new to web controls and im trying
to have a control that returns a bitmap image.

So i have created a web control library, added a control,

have the following

public class MyImage : System.Web.UI.WebControls.Image
{
Public Bitmap MyBitmap()
{
bitmap = new Bitmap(
300,
60,
PixelFormat.Format32bppArgb);
//........
// do some stuff
return bitmap
}
}
so how can i make it that the image control has the results from the
MyBitmap method?

or am i doing this totally wrong?

Jun 26 '06 #1
1 5382
unlike a windows form, a image control in the browser is just a reference to
an external image and generate html like:

<img href="someimage.jpeg">

what you wnat to is create a page that reurns an image and have your web
control reference it:

<img href="myImage.aspx?id=<imageid>">

you can google for samples.

note: modern browsers (not IE) support inline images, in which case the you
base64 encode the image and include it in the url.

-- bruce (sqlwork.com)

"Ben" <Be******@aemail4u.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
Hi Ya,

quick question for you. Im a little new to web controls and im trying
to have a control that returns a bitmap image.

So i have created a web control library, added a control,

have the following

public class MyImage : System.Web.UI.WebControls.Image
{
Public Bitmap MyBitmap()
{
bitmap = new Bitmap(
300,
60,
PixelFormat.Format32bppArgb);
//........
// do some stuff
return bitmap
}
}
so how can i make it that the image control has the results from the
MyBitmap method?

or am i doing this totally wrong?

Jun 26 '06 #2

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

Similar topics

5
by: Steve Amey | last post by:
Hi all I have an ARGB value for a Colour (Eg. -65536. The value was retrieved by using the Color.ToArgb method), is there any way that I can create a System.Drawing.Image or a...
5
by: Erwin | last post by:
At the moment I'm using a report which contains an indicator to show if a Service group of the company isn't working well or is working perfectly. This indicator is a "*" which looks like a traffic...
2
by: Sharon | last post by:
I encountered a strange behavior when doing ‘new Bitmap’: The following code works fine and the given bitmap file is shown on the PictureBox (the m_DrawArea) in the correct bitmap sizes: ...
2
by: Peter Proost | last post by:
Hi group I have the following piece of code that should resize the bitmap in a picture box but it doesn't work as I tought it would. Can someone help me with it? thnx Peter Public Class...
15
by: Hamed | last post by:
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed
6
by: Dave Harvey | last post by:
I have developed a standard .NET control which displays medical images and works fine in applications, but increasingly, my customers are wishing to use it in an ASP.NET environment, so I am...
2
by: Tina | last post by:
I have a System.Drawing.Bitmap myImage; I also have a webcontrols.Image on my web page. I want to put the bitmap into the image but the image can only get it's bitmap from ImageURL which can be a...
4
by: MikeB | last post by:
Hello All, want to be able to pull images from the database and load them into a bitmap through a stream which I have working. I then want to take the bitmap and load it into a Image control...
1
by: WorldHoldOn | last post by:
I need to take raw image data and create a bitmap out of it, then display it on a picturebox control. I know how to create the bitmap pixel data (as in setting up the image), it is the part of...
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
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
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
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...
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
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...

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.