button click event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobby421
    New Member
    • Apr 2007
    • 6

    button click event

    I have a button( btnLogOut)in my master page. In page_load event of this master page I want
    to verify if the button is clicked or not.

    How can I do that.

    Thanks in advance.


    seema
  • Ibuprofen800mg
    New Member
    • Apr 2007
    • 4

    #2
    What do you mean verify? You want a message to pop up for them confirming the click? Or what?

    Comment

    • dscreation
      New Member
      • May 2007
      • 13

      #3
      Originally posted by bobby421
      I have a button( btnLogOut)in my master page. In page_load event of this master page I want
      to verify if the button is clicked or not.

      How can I do that.

      Thanks in advance.


      seema
      write a variable to an xml

      Comment

      • Atran
        Contributor
        • May 2007
        • 319

        #4
        To: bobby421

        If you want to make to your button an event handler, see this code in C#:

        namespace WindowsApplicat ion1
        {
        public partial class Form1 : Form
        {
        public Form1()
        {
        InitializeCompo nent();
        button1.Click += new EventHandler(bu tton1_Click); //set button event
        }
        private void button1_Click(o bject sender, EventArgs e)
        {
        /*here you can write the code you like, to click the button, and the button do the action from the code you typed here.*/
        }
        }
        }

        Comment

        Working...