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 6095423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:48:37+00:00 2026-05-23T12:48:37+00:00

I have got this event in my page aspx.cs: public void deleteBtn_Click(object sender, CommandEventArgs

  • 0

I have got this event in my page aspx.cs:

   public void deleteBtn_Click(object sender, CommandEventArgs e)
{

    UsefulStaticMethods.DeleteComment(int.Parse(e.CommandName));        
}

I am trying to delete a comment from the page. The deletion is successful. However, the website interface doesnt update itself after that event happens.

My Page Load is responsible to drawing all the comments on the page with a dynamic button (delete comment).

I know when the delete button fires, the page Load fires before.. and thats a bit is a problem..cause the page load recreates the page interface, while the deleteBtn_click deletes the comment, and I want to update the interface straight away… “Refresh” the page without the comment that was deleted..

If i execute a function to draw the whole table again, it will draw another comment list along with the comment list drawn at the page Load event.
I cant not refuse not to draw the comment list at page_load, cause i need everything recreated at postback time (including the dynamically created button).-cant use !Ispostback

The question is how can i achieve this/overcome the issue?

  • 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-23T12:48:37+00:00Added an answer on May 23, 2026 at 12:48 pm

    Typically, if your using data-binding then you can just re-bind the control in question. Perhaps, you should modify your function that draws the comment list to clear the existing list (possible by removing rows from table control or clearing control collection from container panel or placeholder (you can introduce a placeholder control just for clearing purpose)).

    Yet another hack to refresh the page is to restart the page-life cycle by doing Server.Transfer to the same page. Generally, I wouldn’t recommend this approach unless page code structure is very complicated and refreshing the data would take many lines of code.

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

Sidebar

Related Questions

I have got this error when using Enterprise Library 3.1 May 2007 version. We
The responses I've got to this question have solved the problem I had in
I got this code in my Master page : <script type=text/javascript> $(#<%=hfJavaScriptDetected.ClientID %>).val('yes'); </script>
I have a custom aspx page loaded in a IFrame in one of the
I've got a situation where I have a visitor arriving at a php page
We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible
We have got loads of options for php + MySQL + Apache combo... Which
I have got a python script which is creating an ODBC connection. The ODBC
I have got a C function in a static library, let's call it A,
I have got the following problem since the server has safe mode turned on,

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.