d3nn1s
asked on
Dynamic Loading Web user controls on click events not firing
Im loading the web user controls programmatically when the gridview row click event fires and the data with parameters came from default.aspx to be load for the web user controls is ok but the problem is the buttons of the web user controls are not firing the click events. How can i set all the controls event to be recognize on the default page when i click the buttons on my web controls?
Note:
I have Nested UpdatePanel on each Tab Panel.
Note:
I have Nested UpdatePanel on each Tab Panel.
You need to reload those usercontrols on the OnInit event. Then the events will fire properly
ASKER
How?
ASKER
i read all the links before and it does not work on this case.
First approach i did is put the webuser controls hardcoded on the parent page .aspx and the button click events on the webuser controls works fine but my problem to that is when the paramater id coming from the parent page was unable to pass via session or viewstate so i cannot bind the text data on the web user control because before i even put the parameter value the webuser control already finsihed loading having the null value.
By doing the dynamic loading of webuser controls programmatically works only if i only want to show the data but the buttons inside it is non responsive and also i have to reload the webuser controls everytime i fired an event.
One of the samples i read is it call the event from the web user control and displays it on parent page. What i had i mind is that i want the parent page to be the search tool and container of all my web user controls that can work as a unit because each web controls caters the data.
If you know how to set the priority of the passing of parameter through session before the web user control Page load fires.
First approach i did is put the webuser controls hardcoded on the parent page .aspx and the button click events on the webuser controls works fine but my problem to that is when the paramater id coming from the parent page was unable to pass via session or viewstate so i cannot bind the text data on the web user control because before i even put the parameter value the webuser control already finsihed loading having the null value.
By doing the dynamic loading of webuser controls programmatically works only if i only want to show the data but the buttons inside it is non responsive and also i have to reload the webuser controls everytime i fired an event.
One of the samples i read is it call the event from the web user control and displays it on parent page. What i had i mind is that i want the parent page to be the search tool and container of all my web user controls that can work as a unit because each web controls caters the data.
If you know how to set the priority of the passing of parameter through session before the web user control Page load fires.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Author did not solve the problem himself. The answer was in the provided links.