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

Dynamic Graphics.

Hi,

I'm new to ASP.Net (first looked at it 2 days ago). All I want to do
is create a user's web page that displays data from a database in the
form of a bespoke display (e.g picture of a computer with a temp guage
on the monitor).

I've got lots of ADO.Net experience so I was able to create the
database side very quickly. I now have a web page that displays the
data as text.

I'd like to use the standard .Net graphics drawing classes for image
creation (or even my own images). How can I update the user's page
without causing a refresh? I.e. I might only want to change the colour
of a LED on the screen.

Any help greatly apreciated.

Thanks,

Nick

Mar 2 '06 #1
2 1339
Hi Nick,

An HTML document (which is what an ASPX page is on the client) has no images
*in* it, but references *to* images that are fetched by the browser via
their URLs. So, the first thing you have to do is implement a page or
HttpHandler that can send an image in response to an HttpRequest. This can
fairly easily be done with an ASPX page that sets the Response.ContentType
property to "image/jpg" (or another image MIME type) and binarily writes the
image to the Response.OutputStream.

It can be done using a single ASPX page that takes information from the
URL's QueryString to determine what sort of an image to return.

In order to have the image update, the browser must make a new request for
the image. The tricky part here is that the browser caches images, so you
should append something to the QueryString to make the URL slightly
different with each Request. After that, you can use JavaScript on the
client, or PostBacks to refresh the image (or even Ajax if you're brave!).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A brute awe as you,
a Metallic hag entity, eat us.
<ng****@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Hi,

I'm new to ASP.Net (first looked at it 2 days ago). All I want to do
is create a user's web page that displays data from a database in the
form of a bespoke display (e.g picture of a computer with a temp guage
on the monitor).

I've got lots of ADO.Net experience so I was able to create the
database side very quickly. I now have a web page that displays the
data as text.

I'd like to use the standard .Net graphics drawing classes for image
creation (or even my own images). How can I update the user's page
without causing a refresh? I.e. I might only want to change the colour
of a LED on the screen.

Any help greatly apreciated.

Thanks,

Nick

Mar 2 '06 #2
Hello Nick,

I understand your question to be about placing something like a progress bar
on an web page and updating it without refreshing the entire page. Simple
answer is that with traditional web pages, it is difficult/not possible to
do, due to the way http works. Http has been a page-oriented, stateless
protocol. However with the introduction of AJAX (Asynchronous Javascript and
XML), that is changing but it is still in the early stages. You can find
articles around which can help you -
http://www.google.com/search?hl=en&q=ajax+progress+bar.

--
enjoy - brians
http://www.limbertech.com
"ng****@gmail.com" wrote:
Hi,

I'm new to ASP.Net (first looked at it 2 days ago). All I want to do
is create a user's web page that displays data from a database in the
form of a bespoke display (e.g picture of a computer with a temp guage
on the monitor).

I've got lots of ADO.Net experience so I was able to create the
database side very quickly. I now have a web page that displays the
data as text.

I'd like to use the standard .Net graphics drawing classes for image
creation (or even my own images). How can I update the user's page
without causing a refresh? I.e. I might only want to change the colour
of a LED on the screen.

Any help greatly apreciated.

Thanks,

Nick

Mar 2 '06 #3

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

Similar topics

7
by: Craig Storey | last post by:
I have a little php application to store day hiking trips and to keep a running total of their yearly trips for a few users. Currently they select their hiking routes using drop lists or...
6
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid...
0
by: Martin Schmid | last post by:
I have a aspx with the code below... I am trying to get the output from the Click redirect to display an image that may be right-clicked to 'save as'. The image displays as expected, but when...
4
by: tg | last post by:
Visual Studio 2003 My problem is that I am dynamically creating a datagrid on pageload. The datagrid is completely dynamic as it is based on the number of columns returned from a recordset. The...
2
by: webonomic | last post by:
Converting data types I'm trying to do some image manipulation. This code project article (http://www.codeproject.com/csharp/imageresize.asp) has a great method I want to modefy. Here it is: ...
1
by: code | last post by:
Hi Grp http://www.books-download.com/?Book=1493-PHP+Hacks+%3a+Tips+%26+Tools+For+Creating+Dynamic+Websites+(Hacks) Description Programmers love its flexibility and speed; designers love its...
11
by: toton | last post by:
Hi, I have little confusion about static memory allocation & dynamic allocation for a cluss member. I have class like class Bar{ public: explicit Bar(){ cout<<"bar default"<<endl; }
2
by: Rich | last post by:
Hello, Some database applicatins have a tooltip feature where when you are dragging the scrollbar of the table view a tooltip appears next to the mouse cursor displaying the approximate record...
1
by: Jeff | last post by:
Hey ASP.NET 2.0 I'm wondering if it's possible to create dynamic transparent images in asp.net 2.0? This is some code (see below) from my web project. In this code below I create a...
0
by: pinxi | last post by:
We are seeking to hire a lead programmer to build a dynamic Web-based imaging module which will enable users to upload a digital image or photograph to the site and choose from thousands of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.