Modal popup extender ? button of gridview1 click ?

hi

i have panel1 and modal popup extender..and i have button1 on gridview1 as templatefield..

how can i use button1 as targetcontrolid of modalpopupextender ?

Thanks


Mark as me if my question or my answer can be helpful for you :)
0
oguzkaygun
4/22/2009 5:56:41 PM
📁 asp.net.web-dev-2005-express
📃 3977 articles.
⭐ 0 followers.

💬 7 Replies
👁️‍🗨️ 135 Views

hi..

go to your ajax-toolkit.dll folder..drag the ajax-toolkit.dll file from there and drop on your toolbox of visual studio..

you can see all ajax tools in which tab you have droped it..


Rushik
(please mark as an answer, if this helps you.)
0
rushik
4/23/2009 12:33:33 PM

hi

i have panel1 and modal popup extender..and i have button1 on gridview1 as templatefield..

how can i use button1 as targetcontrolid of modalpopupextender ?

Thanks


Mark as me if my question or my answer can be helpful for you :)
0
oguzkaygun
4/23/2009 3:24:26 PM

hi

when my page.aspx load, i can see panel1 related to modalpopupextender then panel1 be closed..

But it should not be displayed when page.aspx load..

how can i fix it ?

Thanks


Mark as me if my question or my answer can be helpful for you :)
0
oguzkaygun
4/27/2009 8:06:53 AM

Hi,

We cannot set button that is in Gridview's template for modalpopupextender's TargetControlID directly because they are not in same name container.

In this case, you can try to show this modalpopup in codebehind class. For example:

<%@ Page Language="C#" %>

<%@ Import Namespace="System.Data" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



   


   


       
       

       

           
               
                   
                       
                           
                       

                   

               

           

           
            <asp:button ID="Button3" runat="server" Text="Button" Style="display: none" />
            TargetControlID="Button3"
                PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="OkButton"
                CancelControlID="CancelButton">
           

       

   


 

I look forward to receiving your test results.


Thomas Sun
Microsoft Online Community Support

Please remember to click €œMark as Answer€ on the post that helps you, and to click €œUnmark as Answer€ if a marked post does not actually answer your question.
0
Thomas
4/28/2009 5:22:36 AM

hi

i have added Style="display: none" for panel1 so my panel1 dont display when page load.. when i click button1, my panel1 be displayed..

Style="display: none"

But when i click button1, page load again then my panel1 be displayed.. is there a way that without loading page for displaying panel1 ?

I have tried updatepanel for this(I put panel1 and button1 in updatepanel).. but my panel1 have been displayed below gridview1.. not center of page.aspx.. also CssClass doesnt be displayed..

Thanks
            


Mark as me if my question or my answer can be helpful for you :)
0
oguzkaygun
4/28/2009 6:49:58 AM

hi..

try putting target control and OK button outside the update panel..

start update panel inside the asp:panel and complete it before ok button..this is how i have done before and it works fine.

hope this helps you..


Rushik
(please mark as an answer, if this helps you.)
0
rushik
4/28/2009 3:14:58 PM