Ask a Question related to ASP.NET General, Design and Development.
-
Natty Gur #1
Re: Controlling page from a Thread
Hi,
1) Set the page to be Autorefresh (<META EQUIV="refresh" CONTENT="30"> -
every 30 sec.)
2) Declare session variables that will hold the finished image. Set it
to null to test whenever the image is ready.
3) On page load start new thread and send the Session as parameter.
4) The thread is doing his job. When the thread finish its work, he set
the session variable. For doing so the thread use the session that he
got as parameter.
5) The page will automatically recreate on the server every 30 sec.
every call the page check the session variable if he found it with value
the page return the image to the client.
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Controlling the page view between initialview, bookmarks and links
I have a 300 page InDesign document with links, buttons and bookmarks. The client wants it to open at an initial view of 50%. All of the other... -
Is each .asp page executes under a different thread ?
Addition to subject line: do the COM object instances created in each page belong to the same thread that the page is running in ? do it depend... -
Controlling Page Access in .aspx page
I am building some .NET classes and pages that will be part of an existing classic ASP app. The ASP app uses cookies to store login information for... -
Thread: Control Overrides Page
Hello I would like to be able that my control overrides the complete live circle of the page. The event is trigger by a Query string value. I... -
Controlling how the page opens
Hi there, The information on the page I'm working on is contained in 10 layers. The client doesn't like how it is looking as it is loading (I... -
Sam #2
Re: Controlling page from a Thread
Thanks for the inputs.
I was able to implement your suggestions. But, I still have a problem with refreshing.
As this is a time critical process, I cannot have a delayed refresh of my images (Initially,
I'm just targetting local host). I need to update the image as and when the thread has a new
processed image. Please let me know how I can achieve this. Or, is it possible at all?
Regards,
Udupa.
"Natty Gur" <natty@dao2com.com> wrote in message news:ubFNUE8ODHA.1908@TK2MSFTNGP11.phx.gbl...
Hi,
1) Set the page to be Autorefresh (<META EQUIV="refresh" CONTENT="30"> -
every 30 sec.)
2) Declare session variables that will hold the finished image. Set it
to null to test whenever the image is ready.
3) On page load start new thread and send the Session as parameter.
4) The thread is doing his job. When the thread finish its work, he set
the session variable. For doing so the thread use the session that he
got as parameter.
5) The page will automatically recreate on the server every 30 sec.
every call the page check the session variable if he found it with value
the page return the image to the client.
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Sam Guest
-
Natty Gur #3
Re: Controlling page from a Thread
If you need to show the Image as soon as it ready I think its better
that you will create HttpHandler or page that will change its content
type and send the image as binary data. On the page that display the
image In the Image tag src attribute put the aspx page. When the html
will be render by the browser the browser will call the page in the src
attribute and when the aspx finished its work and send the image it will
be seen on the browser.
Image creation Page :
Page_load
Response.ContentType = "image/jepg"
oBmp = New Bitmap(strPath)
//process the image
oBmp.Save(Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Jpeg)
Page that shows the image
<HTML>
<image src=ImageCreation.aspx>
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Sam #4
Re: Controlling page from a Thread
I was thinking of a separate thread as the process has to update images at
different stages of processing.
As I see now, I can serialize processing within the page class. I am quite
new to the web model, I have
a few problems with page handling:
Following is the desired flow:
1. Client initiates process
2. Server side code begins processing the image
3. During processing, intermediate images are updated to an img control
4. On completion, the final result is updated to a different img control
I get bitmap data of the new image and it is being rendered by a separate
page mapped to the image controls.
(with "ImageUrl " of img control set to the new page's url).
1. Is it possible to refresh this image page more than once from the server
event?
2. How can I render different img controls from aspx pages? Do I need to map
different
pages for each image control, or can I use a single page to cater to
multiple controls?
Please let me know how to go about it.
Thanks,
Udupa.
"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...why> If you need to update the image as and when the thread has processed it,from> are you using a separate threrad? Just have the Page class do the
> processing, and it will not return to the browser until the images are
> ready.
>
> An alternative is to use JavaScript behaviors to contact a Web Service> the client, and that Web Service can either return a response code
> indicating that the images are not ready, or that they are. The JavaScript
> can then set the "src" of the modified images to the location of the
> modified images and change them programmatically without refreshing the
> page. A reference for using JavaScript behaviors to interact with a Web
> Service can be found at:
>
> [url]http://www.webreference.com/js/column97/2.html[/url]
>
> HTH,
>
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Developer
> [url]http://www.takempis.com[/url]
> Big things are made up of
> lots of Little things.
>
Sam Guest
-
Sam #5
Re: Controlling page from a Thread
Right, I am doing this for rendering the image control.
Even if the client is kept on hold while the thread is processing, is it
possible to update the image page more than once with the response
object? ('cause I need to update intermediate images during processing)
Thanks.
Udupa
"Natty Gur" <natty@dao2com.com> wrote in message
news:%23cZzoH9ODHA.3016@TK2MSFTNGP10.phx.gbl...> If you need to show the Image as soon as it ready I think its better
> that you will create HttpHandler or page that will change its content
> type and send the image as binary data. On the page that display the
> image In the Image tag src attribute put the aspx page. When the html
> will be render by the browser the browser will call the page in the src
> attribute and when the aspx finished its work and send the image it will
> be seen on the browser.
>
> Image creation Page :
>
> Page_load
> Response.ContentType = "image/jepg"
> oBmp = New Bitmap(strPath)
> //process the image
> oBmp.Save(Response.OutputStream,
> System.Drawing.Imaging.ImageFormat.Jpeg)
>
>
> Page that shows the image
> <HTML>
> <image src=ImageCreation.aspx>
>
> Natty Gur, CTO
> Dao2Com Ltd.
> 28th Baruch Hirsch st. Bnei-Brak
> Israel , 51114
>
> Phone Numbers:
> Office: +972-(0)3-5786668
> Fax: +972-(0)3-5703475
> Mobile: +972-(0)58-888377
>
> Know the overall picture
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Sam Guest
-
Natty Gur #6
Re: Controlling page from a Thread
I don’t think so. You can set the page buffering to false but you cant
sent Image and replace it in the same request. If all of your clients
use IE I think that what Kevin suggest with web service is the best
solution for your situation.
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Kevin Spencer #7
Re: Controlling page from a Thread
I'm sorry, but you lost me.
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of Little things.
"Sam" <sam_281@hotmail.com> wrote in message
news:ul$3ld%23ODHA.2224@TK2MSFTNGP10.phx.gbl...server> I was thinking of a separate thread as the process has to update images at
> different stages of processing.
> As I see now, I can serialize processing within the page class. I am quite
> new to the web model, I have
> a few problems with page handling:
>
> Following is the desired flow:
> 1. Client initiates process
> 2. Server side code begins processing the image
> 3. During processing, intermediate images are updated to an img control
> 4. On completion, the final result is updated to a different img control
>
> I get bitmap data of the new image and it is being rendered by a separate
> page mapped to the image controls.
> (with "ImageUrl " of img control set to the new page's url).
>
> 1. Is it possible to refresh this image page more than once from themap> event?
> 2. How can I render different img controls from aspx pages? Do I need toJavaScript> different
> pages for each image control, or can I use a single page to cater to
> multiple controls?
>
> Please let me know how to go about it.
>
> Thanks,
> Udupa.
>
>
>
> "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...> why> > If you need to update the image as and when the thread has processed it,> from> > are you using a separate threrad? Just have the Page class do the
> > processing, and it will not return to the browser until the images are
> > ready.
> >
> > An alternative is to use JavaScript behaviors to contact a Web Service> > the client, and that Web Service can either return a response code
> > indicating that the images are not ready, or that they are. The>> > can then set the "src" of the modified images to the location of the
> > modified images and change them programmatically without refreshing the
> > page. A reference for using JavaScript behaviors to interact with a Web
> > Service can be found at:
> >
> > [url]http://www.webreference.com/js/column97/2.html[/url]
> >
> > HTH,
> >
> > Kevin Spencer
> > Microsoft FrontPage MVP
> > Internet Developer
> > [url]http://www.takempis.com[/url]
> > Big things are made up of
> > lots of Little things.
> >
>
Kevin Spencer Guest
-
Sam #8
Re: Controlling page from a Thread
If I was not clear, I will try to put it simple:
On a button click event, server side code has to update two image controls
with a series of bitmap objects in sequence.
As I am mapping web page (which renders image from memory) as the imageurl
of the image control, I will have to refresh this page more than once from
single request.
Now, as I have two image controls having the same url for image, how can I
distinguish between the two for updating different image to each of them?
Sorry, if I am going out the way. But, I am trying to get as much as
possible from this discussion.
If it is not possible to do it in the server side code, pls let me know. I
will try to implement your js/webservice solution.
Thanks,
Udupa.
"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
news:ut85HW$ODHA.2228@tk2msftngp13.phx.gbl...at> I'm sorry, but you lost me.
>
> HTH,
>
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Developer
> [url]http://www.takempis.com[/url]
> Big things are made up of
> lots of Little things.
>
> "Sam" <sam_281@hotmail.com> wrote in message
> news:ul$3ld%23ODHA.2224@TK2MSFTNGP10.phx.gbl...> > I was thinking of a separate thread as the process has to update imagesquite> > different stages of processing.
> > As I see now, I can serialize processing within the page class. I amseparate> > new to the web model, I have
> > a few problems with page handling:
> >
> > Following is the desired flow:
> > 1. Client initiates process
> > 2. Server side code begins processing the image
> > 3. During processing, intermediate images are updated to an img control
> > 4. On completion, the final result is updated to a different img control
> >
> > I get bitmap data of the new image and it is being rendered by ait,> server> > page mapped to the image controls.
> > (with "ImageUrl " of img control set to the new page's url).
> >
> > 1. Is it possible to refresh this image page more than once from the> map> > event?
> > 2. How can I render different img controls from aspx pages? Do I need to> > different
> > pages for each image control, or can I use a single page to cater to
> > multiple controls?
> >
> > Please let me know how to go about it.
> >
> > Thanks,
> > Udupa.
> >
> >
> >
> > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...> > > If you need to update the image as and when the thread has processedthe> JavaScript> > why> > from> > > are you using a separate threrad? Just have the Page class do the
> > > processing, and it will not return to the browser until the images are
> > > ready.
> > >
> > > An alternative is to use JavaScript behaviors to contact a Web Service> > > the client, and that Web Service can either return a response code
> > > indicating that the images are not ready, or that they are. The> > > can then set the "src" of the modified images to the location of the
> > > modified images and change them programmatically without refreshingWeb> > > page. A reference for using JavaScript behaviors to interact with a>> >> > > Service can be found at:
> > >
> > > [url]http://www.webreference.com/js/column97/2.html[/url]
> > >
> > > HTH,
> > >
> > > Kevin Spencer
> > > Microsoft FrontPage MVP
> > > Internet Developer
> > > [url]http://www.takempis.com[/url]
> > > Big things are made up of
> > > lots of Little things.
> > >
> >
>
Sam Guest
-
Kevin Spencer #9
Re: Controlling page from a Thread
Wait a second, Sam. If you use an ASPX page to render an image, it is NEVER
refreshed. Instead, for each request for an image, a new instance of the
page class is created and streams back the image requested.
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of Little things.
"Sam" <sam_281@hotmail.com> wrote in message
news:O5F8an$ODHA.2768@tk2msftngp13.phx.gbl...images> If I was not clear, I will try to put it simple:
>
> On a button click event, server side code has to update two image controls
> with a series of bitmap objects in sequence.
>
> As I am mapping web page (which renders image from memory) as the imageurl
> of the image control, I will have to refresh this page more than once from
> single request.
>
> Now, as I have two image controls having the same url for image, how can I
> distinguish between the two for updating different image to each of them?
>
> Sorry, if I am going out the way. But, I am trying to get as much as
> possible from this discussion.
> If it is not possible to do it in the server side code, pls let me know. I
> will try to implement your js/webservice solution.
>
> Thanks,
> Udupa.
>
>
> "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> news:ut85HW$ODHA.2228@tk2msftngp13.phx.gbl...> > I'm sorry, but you lost me.
> >
> > HTH,
> >
> > Kevin Spencer
> > Microsoft FrontPage MVP
> > Internet Developer
> > [url]http://www.takempis.com[/url]
> > Big things are made up of
> > lots of Little things.
> >
> > "Sam" <sam_281@hotmail.com> wrote in message
> > news:ul$3ld%23ODHA.2224@TK2MSFTNGP10.phx.gbl...> > > I was thinking of a separate thread as the process has to updatecontrol> at> quite> > > different stages of processing.
> > > As I see now, I can serialize processing within the page class. I am> > > new to the web model, I have
> > > a few problems with page handling:
> > >
> > > Following is the desired flow:
> > > 1. Client initiates process
> > > 2. Server side code begins processing the image
> > > 3. During processing, intermediate images are updated to an imgcontrol> > > 4. On completion, the final result is updated to a different imgto> separate> > >
> > > I get bitmap data of the new image and it is being rendered by a> > server> > > page mapped to the image controls.
> > > (with "ImageUrl " of img control set to the new page's url).
> > >
> > > 1. Is it possible to refresh this image page more than once from the> > > event?
> > > 2. How can I render different img controls from aspx pages? Do I needare> it,> > map> > > different
> > > pages for each image control, or can I use a single page to cater to
> > > multiple controls?
> > >
> > > Please let me know how to go about it.
> > >
> > > Thanks,
> > > Udupa.
> > >
> > >
> > >
> > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > > news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...
> > > > If you need to update the image as and when the thread has processed> > > why
> > > > are you using a separate threrad? Just have the Page class do the
> > > > processing, and it will not return to the browser until the imagesService> > > > ready.
> > > >
> > > > An alternative is to use JavaScript behaviors to contact a Web> the> > JavaScript> > > from
> > > > the client, and that Web Service can either return a response code
> > > > indicating that the images are not ready, or that they are. The> > > > can then set the "src" of the modified images to the location of the
> > > > modified images and change them programmatically without refreshing> Web> > > > page. A reference for using JavaScript behaviors to interact with a>> >> > > > Service can be found at:
> > > >
> > > > [url]http://www.webreference.com/js/column97/2.html[/url]
> > > >
> > > > HTH,
> > > >
> > > > Kevin Spencer
> > > > Microsoft FrontPage MVP
> > > > Internet Developer
> > > > [url]http://www.takempis.com[/url]
> > > > Big things are made up of
> > > > lots of Little things.
> > > >
> > >
> > >
> >
>
Kevin Spencer Guest
-
Sam #10
Re: Controlling page from a Thread
Still learning!
OK, new instance of ASPX page does streaming of image for each request.
I think this solves my problem of updating different controls with different
images.
Any workaround for instantiating image page more than once for a single
request on the main page? (I'm yet to figure out how to do it the first
time)
Or do I have to resort to polling from the client script?
Thanks for the help,
Udupa.
"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
news:enBVLYAPDHA.1624@tk2msftngp13.phx.gbl...NEVER> Wait a second, Sam. If you use an ASPX page to render an image, it iscontrols> refreshed. Instead, for each request for an image, a new instance of the
> page class is created and streams back the image requested.
>
> HTH,
>
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Developer
> [url]http://www.takempis.com[/url]
> Big things are made up of
> lots of Little things.
>
> "Sam" <sam_281@hotmail.com> wrote in message
> news:O5F8an$ODHA.2768@tk2msftngp13.phx.gbl...> > If I was not clear, I will try to put it simple:
> >
> > On a button click event, server side code has to update two imageimageurl> > with a series of bitmap objects in sequence.
> >
> > As I am mapping web page (which renders image from memory) as thefrom> > of the image control, I will have to refresh this page more than onceI> > single request.
> >
> > Now, as I have two image controls having the same url for image, how canthem?> > distinguish between the two for updating different image to each ofI> >
> > Sorry, if I am going out the way. But, I am trying to get as much as
> > possible from this discussion.
> > If it is not possible to do it in the server side code, pls let me know.need> images> > will try to implement your js/webservice solution.
> >
> > Thanks,
> > Udupa.
> >
> >
> > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > news:ut85HW$ODHA.2228@tk2msftngp13.phx.gbl...> > > I'm sorry, but you lost me.
> > >
> > > HTH,
> > >
> > > Kevin Spencer
> > > Microsoft FrontPage MVP
> > > Internet Developer
> > > [url]http://www.takempis.com[/url]
> > > Big things are made up of
> > > lots of Little things.
> > >
> > > "Sam" <sam_281@hotmail.com> wrote in message
> > > news:ul$3ld%23ODHA.2224@TK2MSFTNGP10.phx.gbl...
> > > > I was thinking of a separate thread as the process has to update> control> > at> > quite> > > > different stages of processing.
> > > > As I see now, I can serialize processing within the page class. I am> > > > new to the web model, I have
> > > > a few problems with page handling:
> > > >
> > > > Following is the desired flow:
> > > > 1. Client initiates process
> > > > 2. Server side code begins processing the image
> > > > 3. During processing, intermediate images are updated to an img> control> > > > 4. On completion, the final result is updated to a different img> > separate> > > >
> > > > I get bitmap data of the new image and it is being rendered by a> > > > page mapped to the image controls.
> > > > (with "ImageUrl " of img control set to the new page's url).
> > > >
> > > > 1. Is it possible to refresh this image page more than once from the
> > > server
> > > > event?
> > > > 2. How can I render different img controls from aspx pages? Do Iprocessed> to> > > map
> > > > different
> > > > pages for each image control, or can I use a single page to cater to
> > > > multiple controls?
> > > >
> > > > Please let me know how to go about it.
> > > >
> > > > Thanks,
> > > > Udupa.
> > > >
> > > >
> > > >
> > > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > > > news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...
> > > > > If you need to update the image as and when the thread hasthe> are> > it,> > > > why
> > > > > are you using a separate threrad? Just have the Page class do the
> > > > > processing, and it will not return to the browser until the images> Service> > > > > ready.
> > > > >
> > > > > An alternative is to use JavaScript behaviors to contact a Web> > > > from
> > > > > the client, and that Web Service can either return a response code
> > > > > indicating that the images are not ready, or that they are. The
> > > JavaScript
> > > > > can then set the "src" of the modified images to the location ofrefreshing> > > > > modified images and change them programmatically withouta> > the> > > > > page. A reference for using JavaScript behaviors to interact with>> > Web> >> > > > > Service can be found at:
> > > > >
> > > > > [url]http://www.webreference.com/js/column97/2.html[/url]
> > > > >
> > > > > HTH,
> > > > >
> > > > > Kevin Spencer
> > > > > Microsoft FrontPage MVP
> > > > > Internet Developer
> > > > > [url]http://www.takempis.com[/url]
> > > > > Big things are made up of
> > > > > lots of Little things.
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Sam Guest
-
Kevin Spencer #11
Re: Controlling page from a Thread
Why would you want to prevent more than one instance of a class from being
used? What exactly is the issue here?
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of Little things.
"Sam" <sam_281@hotmail.com> wrote in message
news:OvOIFyAPDHA.1072@TK2MSFTNGP10.phx.gbl...different> Still learning!
>
> OK, new instance of ASPX page does streaming of image for each request.
> I think this solves my problem of updating different controls withcan> images.
>
> Any workaround for instantiating image page more than once for a single
> request on the main page? (I'm yet to figure out how to do it the first
> time)
> Or do I have to resort to polling from the client script?
>
> Thanks for the help,
> Udupa.
>
>
> "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> news:enBVLYAPDHA.1624@tk2msftngp13.phx.gbl...> NEVER> > Wait a second, Sam. If you use an ASPX page to render an image, it is> controls> > refreshed. Instead, for each request for an image, a new instance of the
> > page class is created and streams back the image requested.
> >
> > HTH,
> >
> > Kevin Spencer
> > Microsoft FrontPage MVP
> > Internet Developer
> > [url]http://www.takempis.com[/url]
> > Big things are made up of
> > lots of Little things.
> >
> > "Sam" <sam_281@hotmail.com> wrote in message
> > news:O5F8an$ODHA.2768@tk2msftngp13.phx.gbl...> > > If I was not clear, I will try to put it simple:
> > >
> > > On a button click event, server side code has to update two image> imageurl> > > with a series of bitmap objects in sequence.
> > >
> > > As I am mapping web page (which renders image from memory) as the> from> > > of the image control, I will have to refresh this page more than once> > > single request.
> > >
> > > Now, as I have two image controls having the same url for image, howknow.> I> them?> > > distinguish between the two for updating different image to each of> > >
> > > Sorry, if I am going out the way. But, I am trying to get as much as
> > > possible from this discussion.
> > > If it is not possible to do it in the server side code, pls let meam> I> > images> > > will try to implement your js/webservice solution.
> > >
> > > Thanks,
> > > Udupa.
> > >
> > >
> > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > > news:ut85HW$ODHA.2228@tk2msftngp13.phx.gbl...
> > > > I'm sorry, but you lost me.
> > > >
> > > > HTH,
> > > >
> > > > Kevin Spencer
> > > > Microsoft FrontPage MVP
> > > > Internet Developer
> > > > [url]http://www.takempis.com[/url]
> > > > Big things are made up of
> > > > lots of Little things.
> > > >
> > > > "Sam" <sam_281@hotmail.com> wrote in message
> > > > news:ul$3ld%23ODHA.2224@TK2MSFTNGP10.phx.gbl...
> > > > > I was thinking of a separate thread as the process has to update> > > at
> > > > > different stages of processing.
> > > > > As I see now, I can serialize processing within the page class. Ithe> > control> > > quite
> > > > > new to the web model, I have
> > > > > a few problems with page handling:
> > > > >
> > > > > Following is the desired flow:
> > > > > 1. Client initiates process
> > > > > 2. Server side code begins processing the image
> > > > > 3. During processing, intermediate images are updated to an img> > control> > > > > 4. On completion, the final result is updated to a different img> > > > >
> > > > > I get bitmap data of the new image and it is being rendered by a
> > > separate
> > > > > page mapped to the image controls.
> > > > > (with "ImageUrl " of img control set to the new page's url).
> > > > >
> > > > > 1. Is it possible to refresh this image page more than once fromto> need> > > > server
> > > > > event?
> > > > > 2. How can I render different img controls from aspx pages? Do I> > to> > > > map
> > > > > different
> > > > > pages for each image control, or can I use a single page to caterthe> processed> > > > > multiple controls?
> > > > >
> > > > > Please let me know how to go about it.
> > > > >
> > > > > Thanks,
> > > > > Udupa.
> > > > >
> > > > >
> > > > >
> > > > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > > > > news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...
> > > > > > If you need to update the image as and when the thread has> > > it,
> > > > > why
> > > > > > are you using a separate threrad? Just have the Page class doimages> > > > > > processing, and it will not return to the browser until thecode> > are> > Service> > > > > > ready.
> > > > > >
> > > > > > An alternative is to use JavaScript behaviors to contact a Web> > > > > from
> > > > > > the client, and that Web Service can either return a responsewith> the> > > > > > indicating that the images are not ready, or that they are. The
> > > > JavaScript
> > > > > > can then set the "src" of the modified images to the location of> refreshing> > > > > > modified images and change them programmatically without> > > the
> > > > > > page. A reference for using JavaScript behaviors to interact> a>> >> > > Web
> > > > > > Service can be found at:
> > > > > >
> > > > > > [url]http://www.webreference.com/js/column97/2.html[/url]
> > > > > >
> > > > > > HTH,
> > > > > >
> > > > > > Kevin Spencer
> > > > > > Microsoft FrontPage MVP
> > > > > > Internet Developer
> > > > > > [url]http://www.takempis.com[/url]
> > > > > > Big things are made up of
> > > > > > lots of Little things.
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Kevin Spencer Guest
-
Sam #12
Re: Controlling page from a Thread
I'm not trying to prevent more than one class from being used. It is
perfectly
OK with me. But, my problem is with response object. I am still not familiar
with the way responses are sent.
When I have a request from a button click event, can I respond to it by
refreshing (instantiationg) the image page more than once? If so, can you
please
tell me how to do it in code-behind?
Thanks,
Udupa.
"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
news:%23CleuLBPDHA.3152@TK2MSFTNGP10.phx.gbl...the> Why would you want to prevent more than one instance of a class from being
> used? What exactly is the issue here?
>
> HTH,
>
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Developer
> [url]http://www.takempis.com[/url]
> Big things are made up of
> lots of Little things.
>
> "Sam" <sam_281@hotmail.com> wrote in message
> news:OvOIFyAPDHA.1072@TK2MSFTNGP10.phx.gbl...> different> > Still learning!
> >
> > OK, new instance of ASPX page does streaming of image for each request.
> > I think this solves my problem of updating different controls with> > images.
> >
> > Any workaround for instantiating image page more than once for a single
> > request on the main page? (I'm yet to figure out how to do it the first
> > time)
> > Or do I have to resort to polling from the client script?
> >
> > Thanks for the help,
> > Udupa.
> >
> >
> > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > news:enBVLYAPDHA.1624@tk2msftngp13.phx.gbl...> > NEVER> > > Wait a second, Sam. If you use an ASPX page to render an image, it is> > > refreshed. Instead, for each request for an image, a new instance ofonce> > controls> > > page class is created and streams back the image requested.
> > >
> > > HTH,
> > >
> > > Kevin Spencer
> > > Microsoft FrontPage MVP
> > > Internet Developer
> > > [url]http://www.takempis.com[/url]
> > > Big things are made up of
> > > lots of Little things.
> > >
> > > "Sam" <sam_281@hotmail.com> wrote in message
> > > news:O5F8an$ODHA.2768@tk2msftngp13.phx.gbl...
> > > > If I was not clear, I will try to put it simple:
> > > >
> > > > On a button click event, server side code has to update two image> > imageurl> > > > with a series of bitmap objects in sequence.
> > > >
> > > > As I am mapping web page (which renders image from memory) as the> > > > of the image control, I will have to refresh this page more thanI> can> > from> > > > single request.
> > > >
> > > > Now, as I have two image controls having the same url for image, how> know.> > I> > them?> > > > distinguish between the two for updating different image to each of> > > >
> > > > Sorry, if I am going out the way. But, I am trying to get as much as
> > > > possible from this discussion.
> > > > If it is not possible to do it in the server side code, pls let me> > I> > > > will try to implement your js/webservice solution.
> > > >
> > > > Thanks,
> > > > Udupa.
> > > >
> > > >
> > > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> > > > news:ut85HW$ODHA.2228@tk2msftngp13.phx.gbl...
> > > > > I'm sorry, but you lost me.
> > > > >
> > > > > HTH,
> > > > >
> > > > > Kevin Spencer
> > > > > Microsoft FrontPage MVP
> > > > > Internet Developer
> > > > > [url]http://www.takempis.com[/url]
> > > > > Big things are made up of
> > > > > lots of Little things.
> > > > >
> > > > > "Sam" <sam_281@hotmail.com> wrote in message
> > > > > news:ul$3ld%23ODHA.2224@TK2MSFTNGP10.phx.gbl...
> > > > > > I was thinking of a separate thread as the process has to update
> > > images
> > > > at
> > > > > > different stages of processing.
> > > > > > As I see now, I can serialize processing within the page class.cater> am> the> > > > quite
> > > > > > new to the web model, I have
> > > > > > a few problems with page handling:
> > > > > >
> > > > > > Following is the desired flow:
> > > > > > 1. Client initiates process
> > > > > > 2. Server side code begins processing the image
> > > > > > 3. During processing, intermediate images are updated to an img
> > > control
> > > > > > 4. On completion, the final result is updated to a different img
> > > control
> > > > > >
> > > > > > I get bitmap data of the new image and it is being rendered by a
> > > > separate
> > > > > > page mapped to the image controls.
> > > > > > (with "ImageUrl " of img control set to the new page's url).
> > > > > >
> > > > > > 1. Is it possible to refresh this image page more than once from> > need> > > > > server
> > > > > > event?
> > > > > > 2. How can I render different img controls from aspx pages? Do I> > > to
> > > > > map
> > > > > > different
> > > > > > pages for each image control, or can I use a single page tomessage> to> > > > > > multiple controls?
> > > > > >
> > > > > > Please let me know how to go about it.
> > > > > >
> > > > > > Thanks,
> > > > > > Udupa.
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote inThe> the> > processed> > > > > > news:uOB91A%23ODHA.1364@TK2MSFTNGP10.phx.gbl...
> > > > > > > If you need to update the image as and when the thread has> > > > it,
> > > > > > why
> > > > > > > are you using a separate threrad? Just have the Page class do> images> > > > > > > processing, and it will not return to the browser until the> code> > > are
> > > > > > > ready.
> > > > > > >
> > > > > > > An alternative is to use JavaScript behaviors to contact a Web
> > > Service
> > > > > > from
> > > > > > > the client, and that Web Service can either return a response> > > > > > > indicating that the images are not ready, or that they are.of> > > > > JavaScript
> > > > > > > can then set the "src" of the modified images to the location> with> > the> > refreshing> > > > > > > modified images and change them programmatically without> > > > the
> > > > > > > page. A reference for using JavaScript behaviors to interact>> > a> >> > > > Web
> > > > > > > Service can be found at:
> > > > > > >
> > > > > > > [url]http://www.webreference.com/js/column97/2.html[/url]
> > > > > > >
> > > > > > > HTH,
> > > > > > >
> > > > > > > Kevin Spencer
> > > > > > > Microsoft FrontPage MVP
> > > > > > > Internet Developer
> > > > > > > [url]http://www.takempis.com[/url]
> > > > > > > Big things are made up of
> > > > > > > lots of Little things.
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Sam Guest



Reply With Quote

