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. UpdatePanel issue

UpdatePanel issue

Scheduled Pinned Locked Moved ASP.NET
helpjavascriptcss
2 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.
  • C Offline
    C Offline
    cisco2103
    wrote on last edited by
    #1

    I have a gridView with has a textbox in each row. When I click my adjust button I add up all the textboxes and if they don't equal 1 I set a bolean and show a alert message. This works when the page does a full postback but when I throw a updatePanel around my grid and set up triggers its doesn't and gives me a unexpected javaScript Error. Any help will be appreciated. Here's a snippet. Protected Sub btnAdjust_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdjust.Click 'Validate that the yield are 1 YieldValidation() If BolValid = False Then ScriptManager.RegisterStartupScript(Me.Page, Me.GetType, "alert", "alert('Yields must equal 1. Your total is " & yieldTotal & ".')", True) 'Page.ClientScript.RegisterClientScriptBlock(Page.GetType, "alert", "alert('Yields must equal 1. Your total is " & yieldTotal & ".')", True) End If End Sub

    C 1 Reply Last reply
    0
    • C cisco2103

      I have a gridView with has a textbox in each row. When I click my adjust button I add up all the textboxes and if they don't equal 1 I set a bolean and show a alert message. This works when the page does a full postback but when I throw a updatePanel around my grid and set up triggers its doesn't and gives me a unexpected javaScript Error. Any help will be appreciated. Here's a snippet. Protected Sub btnAdjust_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdjust.Click 'Validate that the yield are 1 YieldValidation() If BolValid = False Then ScriptManager.RegisterStartupScript(Me.Page, Me.GetType, "alert", "alert('Yields must equal 1. Your total is " & yieldTotal & ".')", True) 'Page.ClientScript.RegisterClientScriptBlock(Page.GetType, "alert", "alert('Yields must equal 1. Your total is " & yieldTotal & ".')", True) End If End Sub

      C Offline
      C Offline
      cisco2103
      wrote on last edited by
      #2

      I fixed it. It was a BONEHEAD mistake that took hours for a simple placing of the update panel in the wrong position! DOHH

      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