Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Dear All
Want to show popup on Click of serverside button control using ModalPopupExtender in Ajax
When I will click on button, controls on popup control should fill with some values
any solution for this problem?

please help me.

thanks in adv.
Posted
Comments
Sandeep Mewara 11-May-11 3:02am    
Tried anything?
Hemant__Sharma 11-May-11 3:56am    
Hello Manoj,

1)
A request, whenever you are posting such question add some code to it working/not working condition, for example in current question if you would have pasted .aspx markup containing modalpopup and asp:button declaration it would have helped others to answer it quick.

In absence of code the helper has to write it on his own compile/test it send it to you like @Mahendra.p25 did, and it takes a lot of time. If you would have given some sample lot of people would have tested suggestion on that code only that would have saved lot of time.

2)
People helping here understand your situation that you are going through a problem and try their best to provide a solution and if they do that you should also respect the help they are providing. And there are other ways to tell was the answer helpful and not.

Hope you will take care of this and wish that you will get best answers to your question.

Thanks,
Hemant

any solution for this problem?

Yes Google - Soogle search - modeulpopupextender in asp.net[^]

And this is the first result - ModalPopup Sample[^]
:doh:
 
Share this answer
 
Comments
Ankur\m/ 11-May-11 3:18am    
Firstly, you don't talk to a stranger in a technical forum like this. Please follow forum etiquette.

when i click on a button button should be postback and then popup should be display
That is just a little variation. You need popup on page load after button click creates a post back. So you will show it up in Button Click event.
BTW did you read the ModalPopup Sample link I gave? I copy this line from the link -
The popup can be shown via server in code behind and on the client in script by calling the ModalPopupExtender methods to show and hide.

I hope that clears your doubt.
Maddy_1008 11-May-11 3:53am    
Sorry for my mistake
try this

XML
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <div>
        <asp:Panel ID="Panel2" runat="server" BorderColor="Red" BorderStyle="Solid" Width="30%"
            BackColor="#EEEEEE">
            !<span class="style1">!! Have you informed to your Seniors? !!! </span>
            <br />
            <asp:Button ID="OkButton" runat="server" Text="Yes" />
            <asp:Button ID="CancelButton" runat="server" Text="No" OnClick="DoSomething" />
        </asp:Panel>
        <asp:ModalPopupExtender ID="Panel2_ModalPopupExtender" runat="server" TargetControlID="Button1"
            PopupControlID="Panel2"  DynamicServicePath="" >
        </asp:ModalPopupExtender>
        
        <asp:Button ID="Button1" runat="server" Text="" style="visibility:hidden" />
        <asp:Button ID="Button2" runat="server" Text="Click" onclick="Button2_Click" />
    </div>


 protected void Button2_Click(object sender, EventArgs e)
      {
          Panel2_ModalPopupExtender.Show();
      }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900