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. how to refresh only adrotator and not the web page

how to refresh only adrotator and not the web page

Scheduled Pinned Locked Moved ASP.NET
announcementadobetutorial
8 Posts 3 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
    aashish saalvi
    wrote on last edited by
    #1

    hi, i m developing a web system. i want to flash some news where i want only the news to be refreshed and not the whole page. i tried using add rotator along with ajax control i.e update panel, but still it is not working. can anyone provide me the code to do the same.

    C M 2 Replies Last reply
    0
    • A aashish saalvi

      hi, i m developing a web system. i want to flash some news where i want only the news to be refreshed and not the whole page. i tried using add rotator along with ajax control i.e update panel, but still it is not working. can anyone provide me the code to do the same.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, AJAX is the only way to do it, unless you put the ad rotator in an iframe.

      Christian Graus Driven to the arms of OSX by Vista.

      A 2 Replies Last reply
      0
      • A aashish saalvi

        hi, i m developing a web system. i want to flash some news where i want only the news to be refreshed and not the whole page. i tried using add rotator along with ajax control i.e update panel, but still it is not working. can anyone provide me the code to do the same.

        M Offline
        M Offline
        mr_muskurahat
        wrote on last edited by
        #3

        have you placed that addrotator exectally inside the update panel do check it.. when you drag and drop the controls at design time some times it place the control outside...

        Government Dyal Singh College Lahore.

        A 1 Reply Last reply
        0
        • C Christian Graus

          Well, AJAX is the only way to do it, unless you put the ad rotator in an iframe.

          Christian Graus Driven to the arms of OSX by Vista.

          A Offline
          A Offline
          aashish saalvi
          wrote on last edited by
          #4

          can you provide me the code please.

          1 Reply Last reply
          0
          • M mr_muskurahat

            have you placed that addrotator exectally inside the update panel do check it.. when you drag and drop the controls at design time some times it place the control outside...

            Government Dyal Singh College Lahore.

            A Offline
            A Offline
            aashish saalvi
            wrote on last edited by
            #5

            the ad rotator is exactly inside the update panel yet it is not working. can you provide me the code for it. thanks in advance.

            A 1 Reply Last reply
            0
            • C Christian Graus

              Well, AJAX is the only way to do it, unless you put the ad rotator in an iframe.

              Christian Graus Driven to the arms of OSX by Vista.

              A Offline
              A Offline
              aashish saalvi
              wrote on last edited by
              #6

              this is the code of my .aspx file <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <br /> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> <br /> <asp:ScriptManager ID="ScriptManager2" runat="server"/> <asp:Timer ID="Timer2" runat="server" Interval="5000"/> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" /> </Triggers> <asp:AdRotator ID="AdRotator2" runat="server" AdvertisementFile="~/AdRotatorFiles.xml" KeywordFilter="small"> </asp:AdRotator> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel>  </div> </form> </body> </html> and in the .cs file i have written the following code. protected void Timer2_Tick(object sender, EventArgs e) { UpdatePanel2.Update(); Label1.Text = "Done"; } thanks in advance

              1 Reply Last reply
              0
              • A aashish saalvi

                the ad rotator is exactly inside the update panel yet it is not working. can you provide me the code for it. thanks in advance.

                A Offline
                A Offline
                aashish saalvi
                wrote on last edited by
                #7

                this is the code of my .aspx file <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <br /> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> <br /> <asp:ScriptManager ID="ScriptManager2" runat="server"/> <asp:Timer ID="Timer2" runat="server" Interval="5000"/> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" /> </Triggers> <asp:AdRotator ID="AdRotator2" runat="server" AdvertisementFile="~/AdRotatorFiles.xml" KeywordFilter="small"> </asp:AdRotator> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> &nbsp;</div> </form> </body> </html> and in the .cs file i have written the following code. protected void Timer2_Tick(object sender, EventArgs e) { UpdatePanel2.Update(); Label1.Text = "Done"; } thanks in advance

                M 1 Reply Last reply
                0
                • A aashish saalvi

                  this is the code of my .aspx file <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <br /> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> <br /> <asp:ScriptManager ID="ScriptManager2" runat="server"/> <asp:Timer ID="Timer2" runat="server" Interval="5000"/> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" /> </Triggers> <asp:AdRotator ID="AdRotator2" runat="server" AdvertisementFile="~/AdRotatorFiles.xml" KeywordFilter="small"> </asp:AdRotator> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> &nbsp;</div> </form> </body> </html> and in the .cs file i have written the following code. protected void Timer2_Tick(object sender, EventArgs e) { UpdatePanel2.Update(); Label1.Text = "Done"; } thanks in advance

                  M Offline
                  M Offline
                  mr_muskurahat
                  wrote on last edited by
                  #8

                  place add rotator inside content template... and check..

                  Government Dyal Singh College Lahore.

                  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