Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Automatic page refresh

Automatic page refresh

Scheduled Pinned Locked Moved ASP.NET
designsysadminbeta-testingtoolshelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AaronM_NZ
    wrote on last edited by
    #1

    I am developing a web application that controls services on a remote computer(s). I have most of the application done, but am a bit stuck on one section, which runs 'scripts'. Basically I have say 10 services in a datagrid, and they should all be controlled in a pre-determined order. I can make the script run, but would like to give some feedback to the end user after each service has processed it given command. Ie, start the first service, make an 'tick' image visible in the datagrid on the client PC, and then move onto the next service. Currently, it processes the entire script, and returns a page back to the user with all the ticks there. How could I do this? I have tried a server.execute and server.transfer back to the page using session variables, but they all give similar a result (ie, process the entire page and then push the result back to the user). An early development sample test I was using in the Page_Load is: If Not Session("curstep") Is Nothing Then 'curstep is assigned a # when the 'execute' button is pushed lblMessages.Text = Session("script") & " running..." Dim intStep As Int16 = Session("curstep") dgSteps.SelectedIndex = intStep Dim i As DataGridItem = dgSteps.SelectedItem Dim img As System.Web.UI.WebControls.Image = i.FindControl("imgProcess") img.Visible = True intStep += 1 Session("curstep") = intStep System.Threading.Thread.Sleep(1000) If intStep >= ddlSelectScript.Items.Count Then Exit Sub Server.Execute("scripts.aspx") 'call myself back to process the next step. End If I would like the client page to reload on the server.execute line, or refresh the data somehow. Is there some other way of possibly doing this?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups