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. I cant seem to generate an async postback.

I cant seem to generate an async postback.

Scheduled Pinned Locked Moved ASP.NET
helptutorialcsharpasp-netdatabase
3 Posts 2 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.
  • S Offline
    S Offline
    SomeGuyThatIsMe
    wrote on last edited by
    #1

    I need to use ajax to handle price calculations based on user selections, i was going to use a checkbox list, but i discovered that i can't seem to get an async postback happening. i have a calendar extender on the page that works perfectly from the Ajax Control Toolkit, but i cant get this simple example to work. Works fine outside of this page/project. I'm using asp.net 3.5 the solution was converted from 1.1 to 3.5 a while ago. I cant post the whole page(rather long) this appears about 650 lines down up top i have form div asp:scriptManager then some tables some nested in the row above this i have another dateTime. Now codeblock to see if i can get the dates out of synch which seems to be a standard example on all the sites i've looked at. Regardless of what i do the button in the updatePanel runs a whole postback, i've tried setting triggers, enabling partial rendering(and having it off) setting the children as triggers property, along with the render and update modes. I've read Dino Esposito's book on ajax along with other artciles and anything i can find.

                                             <asp:UpdatePanel ID="JokeUpdatePanel" runat="server">
                                                <ContentTemplate>
                                                    <asp:Label ID="JokeText" runat="server"></asp:Label><br />
                                                    <br /><%=DateTime.Now %>
                                                    <asp:Button ID="NewJokeButton" runat="server" OnClick="NewJokeButton\_Click" Text="Show Me a Random Joke!" />
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
    

    I've disabled most of the things i do on page_load event incase it was messing with something now all i do is in the initial load of the page (!page.IsPostBack) and set up a db connection(dont open it just create it), which shouldnt matter. no matter what i try the whole page refreshes, but the demo project i have on the same server runs fine. I've tried the integrated server in VS 2008 sp1, and IIS on my local machine. Any help would be appreciated, I think it may have something to do with having converted the project but i have no idea what or how to fix it. John

    Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are a

    T 1 Reply Last reply
    0
    • S SomeGuyThatIsMe

      I need to use ajax to handle price calculations based on user selections, i was going to use a checkbox list, but i discovered that i can't seem to get an async postback happening. i have a calendar extender on the page that works perfectly from the Ajax Control Toolkit, but i cant get this simple example to work. Works fine outside of this page/project. I'm using asp.net 3.5 the solution was converted from 1.1 to 3.5 a while ago. I cant post the whole page(rather long) this appears about 650 lines down up top i have form div asp:scriptManager then some tables some nested in the row above this i have another dateTime. Now codeblock to see if i can get the dates out of synch which seems to be a standard example on all the sites i've looked at. Regardless of what i do the button in the updatePanel runs a whole postback, i've tried setting triggers, enabling partial rendering(and having it off) setting the children as triggers property, along with the render and update modes. I've read Dino Esposito's book on ajax along with other artciles and anything i can find.

                                               <asp:UpdatePanel ID="JokeUpdatePanel" runat="server">
                                                  <ContentTemplate>
                                                      <asp:Label ID="JokeText" runat="server"></asp:Label><br />
                                                      <br /><%=DateTime.Now %>
                                                      <asp:Button ID="NewJokeButton" runat="server" OnClick="NewJokeButton\_Click" Text="Show Me a Random Joke!" />
                                                  </ContentTemplate>
                                              </asp:UpdatePanel>
      

      I've disabled most of the things i do on page_load event incase it was messing with something now all i do is in the initial load of the page (!page.IsPostBack) and set up a db connection(dont open it just create it), which shouldnt matter. no matter what i try the whole page refreshes, but the demo project i have on the same server runs fine. I've tried the integrated server in VS 2008 sp1, and IIS on my local machine. Any help would be appreciated, I think it may have something to do with having converted the project but i have no idea what or how to fix it. John

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are a

      T Offline
      T Offline
      TylerBrinks
      wrote on last edited by
      #2

      You should set up a update target in the update panel that points to your button control. That'll force the update panel to respond via callback to the button's click event.

      S 1 Reply Last reply
      0
      • T TylerBrinks

        You should set up a update target in the update panel that points to your button control. That'll force the update panel to respond via callback to the button's click event.

        S Offline
        S Offline
        SomeGuyThatIsMe
        wrote on last edited by
        #3

        I've tried setting up the triggers on the update panel, as well as ChildrenAsTriggers, i dont see where you can set up a target. The button click will change the text of a text box in the update panel's contentTemplate, and there's a datetime value that refreshes.

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        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