I have a page that is mostly dynamically built in the page load of my VB.net code behind page.
The issue is that I made a change to the page and added a button that redirects to a secondary page. When the button is clicked there is a very noticeable lag until the button click event fires because the page is being rebuilt every time.
I had not wrapped the code in the load event in the If not ispostback.... because I have dynamic controls that the user interacts with and I need the page to be rebuilt when the user clicks them.
The dynamic controls are clickable table cells. I did some looking and I found that the RegisterPostBackControl. I thought this would be perfect but, it does not although I maybe using it incorrectly.
Here is the code flow.
If not ispostback then
private sub setuppage()
'get a reference to the scriptmanager on the master page
Dim scriptManager = DirectCast