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. Refreshing on the client side dyanmically

Refreshing on the client side dyanmically

Scheduled Pinned Locked Moved ASP.NET
javadatabasedesigntoolshelp
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.
  • V Offline
    V Offline
    viktor9990
    wrote on last edited by
    #1

    I have a page called CustomerSlides.aspx which contains an iframe(with the source Lookupage.aspx). The iframe page will look continuously in the database to see if a value has changed: if it is true it will run a java script dynamically to update the parent page CustomerSlides.aspx.cs. The value in the Database is changed from another aspx page så all the changes made in this page will be updated in CustomerSlides.aspx. I used the code below and it is working as long as it is only one client looking at CustomerSlides.aspx. If more than one client are looking at the same page from diffrent browsers(computers) no updates are done. Then have to refresh manually. I wonder why it is working for one client and not for the other? Is there any solution? Any help is highly appreciated. See my code below: Code behind for(CustomerSlides.aspx.cs): public class CustomerSlides : System.Web.UI.Page { protected System.Web.UI.WebControls.Label Message; protected System.Web.UI.HtmlControls.HtmlGenericControl mainIframe; public string fullPath; private void Page_Load(object sender, System.EventArgs e) { //Get the logged on administrator's email, retrieved from "signincustomer.aspx.cs"(Will be used in the next step) // string adminEmail = Convert.ToString(Session["senderAdmin"]); string adminEmail = "test@test.se"; //Retrieve the fullPath to the slide to be shown // Create Instance of Connection and Command Object SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]); // SqlCommand myCommand = new SqlCommand("Portal_GetSlideFullPathFlag2", myConnection); SqlCommand myCommand = new SqlCommand("SELECT DISTINCT FullPath FROM TTflag2 WHERE AdminEmail = @AdminEmail ", myConnection); // Mark the Command as a SPROC // myCommand.CommandType = CommandType.StoredProcedure; // Add Parameters to SPROC SqlParameter parameterAdminEmail = new SqlParameter("@AdminEmail", SqlDbType.NVarChar, 50); parameterAdminEmail.Value = adminEmail; myCommand.Parameters.Add(parameterAdminEmail); try { // Execute the command myConnection.Open(); SqlDataReader dr = myCommand.ExecuteReader(CommandBehavior.CloseConnection); dr.Read(); fullPath = dr.GetString(0); dr.Close(); } catch (Exception ex) { Message.Text = ex.Message + " " + ex.StackTrace; } if ((fullPath != string.Empty) & (fullPath != null)) { //Find the mainI

    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