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