Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want To Popup user control as modal-popup and Click button automatically when popup is rendering from main page code....?
Posted
Updated 13-Oct-11 1:24am
v2

Hi,

when you want to activate that buton and where?

If you want to invoke that button in javascript just use this line
where you want to ..

JavaScript
document.getElementById('<%=Btncheck.ClientID%>').click();


All the Best
 
Share this answer
 
Comments
_Tushar Patil 13-Oct-11 7:43am    
Thanks
Muralikrishna8811 13-Oct-11 7:44am    
you are welcome
How to: Call a Button's Click Event Programmatically
Visual Studio 2008

Even if a user does not click a button, you can raise the button's Click event programmatically by using the PerformClick method. The following example demonstrates how to call the click event of a button within a program. When button2 is clicked, the click event for button1 is also triggered.
To use buttons in a program

    On the File menu, click New Project.

    In the New Project dialog box, in the Templates pane, click Windows Forms Application, and then click OK.

    A new Windows Forms project opens.

    From the Toolbox, drag two Button controls onto the form.

    In the form, double-click the first button (button1) to create the Click event handler.

    In the button1_Click event handler, type the following line of code.
    C#

    MessageBox.Show("button1.Click was raised.");



    Right-click the code, and then click View Designer.

    Double-click the second button (button2) to create the Click event handler.

    In the button2_Click event handler, type the following line of code.
    C#

    // Call the Click event of button1.
    button1.PerformClick();



    Press F5 to run the program.

    The program starts and the form appears. When you click either button1 or button2, the click event handler of button1 displays a message.
C#

 
Share this answer
 
Comments
_Tushar Patil 13-Oct-11 7:25am    
Thanks A lot But I want It in Website....?

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