Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3751502
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:05:02+00:00 2026-05-19T09:05:02+00:00

I’m a bit stuck with a problem. I feel like the solution should be

  • 0

I’m a bit stuck with a problem. I feel like the solution should be fairly straight forward but I’m completely out of ideas for some reason.

Here’s the problem. I’ve got a user control with a couple of buttons. Think of them as ‘On’ and ‘Off’. When either button is clicked an async method is called. If the method is successful an event is fired. Within the event I want to update the enabled property of the two buttons so that only a single button is clickable at any one time. The problem is that any changes I make to the properties are not shown on screen because the postback is already complete. I tried wrapping the buttons in an UpdatePanel but I get an “Update method can only be called on UpdatePanel with ID ‘xxxx’ before Render’ error. I understand why the problem occurs but I can’t think of a solution. Help!

Ideally what I’d like to do is simply call a method within the event that will update the UI, but I don’t know if that’s possible.

EDIT

Here’s some example code. I can’t post the exact code, but this explains the problem:

Partial Class ExampleUserControl
    Inherits Inherits System.Web.UI.UserControl

    Private WithEvents obj As MyObj

    Private Sub btnOn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOn.Click
        obj = New MyObj()
        obj.On() ' Calls OnEvent on success
    End Sub

    Private Sub btnOff_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOff.Click
        obj = New MyObj()
        obj.Off() ' Calls OffEvent on success
    End Sub

    Private Sub On() Handles obj.OnEvent
        btnOn.Enabled = False
        btnOff.Enabled = True
        'updatePanel.Update() This throws an exception
    End Sub

    Private Sub Off() Handles obj.OffEvent
        btnOn.Enabled = True
        btnOff.Enabled = False
        'updatePanel.Update() This throws an exception
    End Sub

End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:05:03+00:00Added an answer on May 19, 2026 at 9:05 am

    You can’t just “push” html to the browser, updatepanel or not. You can only react to a “pull” from the browser.

    So you need to have the update panel refresh itself every x seconds. Then you can check the server side status and update the panel accordingly.

    See for instance: http://ajax.net-tutorials.com/controls/timer-control/

    Don’t forget to switch off the timer when the action is done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.