modalpopupextender always shown and targetcontrolid is not working

punkstist

New Member
I have a repeater and it has a column of linkbuttons in it. I want to add those linkbuttons to \[code\]targetcontrolid\[/code\] but it failed because they are in the repeater. So i create an additional invisible button like this :\[code\]<asp:Button ID="btnFakePopUp" runat="server" Text="" visible="false" onclick="btnFakePopUp_Click"/>\[/code\]And in i tried to link the linkbutton to the invisible button in this code :\[code\] protected void lbtnPosition_Click(object sender, EventArgs e) { btnFakePopUp_Click(sender, e); } protected void btnFakePopUp_Click(object sender, EventArgs e) { popupJob.Show(); }\[/code\]And this is my \[code\]modalpopupextender\[/code\] code (my prefix is asp: so dont get confuse) :\[code\] <asp:ModalPopupExtender ID="popupJob" runat="server" PopupControlID="panelPopup" CancelControlID="popupClose" TargetControlID="btnFakePopUp" Drag="true" PopupDragHandleControlID="panelPopup"></asp:ModalPopupExtender><asp:Panel ID="panelPopup" runat="server" BackColor="#ebf0ff" Width="300px"><div> test<br /> <asp:Button ID="btnSave" runat="server" Text="Save" /> <asp:Button ID="btnApply" runat="server" Text="Apply" /> <input id="popupClose" type="button" value="http://stackoverflow.com/questions/11791300/Close" /></div></asp:Panel>\[/code\]The problems are :1. The \[code\]panelpopup\[/code\] is always shown...(it should be hidden, and only be shown when the user click the link button)2. Nothing happened when i tried to click the link button (the \[code\]panelpopup\[/code\] should be shown)Thank you :D
 
Back
Top