2009-01-15 37 views
3

我有一個名爲CustomerFinder的UserControl用於搜索客戶。中繼器內有「ADD」按鈕。我爲Repeater_ItemCommand創建了一個事件處理程序。因爲我打算在另一頁上使用它。如何將觸發器添加到Updatepanel,其中觸發器的事件位於Repeater內的用戶控件內部?

在另一頁上,我使用此用戶控件不在UpdatePanel中。 有一個選定客戶的更新面板(當他們點擊添加,客戶被選中)

當他們點擊UserControl中的ADD按鈕時,我想要更新面板自我刷新。

alt text http://www.barbarosalp.com/questions/updatePanelcommand.png

正如你看到的上面的智能感知可以得到事件名稱 「OnrptCustomersCommand

alt text http://www.barbarosalp.com/questions/updatePanelcommand1.png

這是觸發...

我得到一個錯誤「無法找到事件'OnrptCustomersComman'「

我怎樣才能完成它? 在此先感謝

回答

1

感謝邁克爾Knishkern他的答案。

但我做到了我的工作方式太:)

只要刪除2個字符「開」從事件的名稱。

OnrptCustomersEventrptCustomersEvent

再次感謝

3

取下觸發部分ucCustomerFinder asyncpostbacktrigger元素,並添加pnlSelectedCustomers.Update()命令將Repeater_ItemCommand事件中繼

+0

你是對的:)我不能明白爲什麼我嘗試超事情這:)。但我通過aspx頁面上的assignin觸發器工作。 非常感謝。 – 2009-01-15 20:28:08