|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
dynamic control event not firinghai all!
In a web button click event iam creating a new web button and adding handler to it. But that event is not firing when iam clicking a dynamic button! plz reply... Hi,
dynamic controls need to be added at the Page_Load (at the latest) so that they are able to raise postback events. So if you create and add add a button in an click event handler, you need to recreate that dynamical button on postback at the page_load (at the latest) so that it's able to raise its Click event. Reason for this is postback data loading happening twice, once before Page_load and second time right after Page_load. After that second loading phase, postback data is not loaded anymore and therefore controls added aften this phase can't raise their events anymore. Postback events (like Button's Click) are happening after this phase, so therefore you see uit in your scenario. -- Show quoteHide quoteTeemu Keiski ASP.NET MVP, Finland "Ganesh Kumar via DotNetMonster.com" <forum@nospam.DotNetMonster.com> wrote in message news:6e94ed94374b4f2581d399c9e3139c06@DotNetMonster.com... > hai all! > In a web button click event iam creating a new web button and adding > handler to it. But that event is not firing when iam clicking a dynamic > button! plz reply... > > -- > Message posted via http://www.dotnetmonster.com Thanx TEEMU!
Actually wht iam doing is!Iam creating a report! When the user clicks submit button,according to the selected date of the user i have to display the data! Iam using webtable to display the data and iam adding a htmlanchor to it. when user click it server side click event should be raised and goto the corresponding page!Any other way to do it!
) expected erro when trying to create a popup
click on TreeNode User Control, vanishes Problem programmatically creating tabstrip webcontrol Which event? Capturing event from other custom control within another custom control DataList inside a datalist. Free TreeView Controls ? Textbox interpreting html tags (like the label) Hiding Email address |
|||||||||||||||||||||||