moving code from onload method to button click method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anun2003
    New Member
    • Feb 2007
    • 1

    #1

    moving code from onload method to button click method

    Hello,
    I am new to .net and need help.
    I am working on a form (.net version 2.0) in which code has to be moved from OnLoad method of a page to a button click event (Button is on the same page).
    Is this possible? How do I go about this?
    Thanks in advance.
    Anu
  • NSRao
    New Member
    • Jan 2007
    • 11

    #2
    Originally posted by anun2003
    Hello,
    I am new to .net and need help.
    I am working on a form (.net version 2.0) in which code has to be moved from OnLoad method of a page to a button click event (Button is on the same page).
    Is this possible? How do I go about this?
    Thanks in advance.
    Anu
    Hi

    It is possible but before moving the code make sure if you are using any initialization which will using accross the project and it should not impact the project.

    Comment

    • nmsreddi
      Contributor
      • Jul 2006
      • 366

      #3
      Hello

      First why you want to move your code from page load,

      you can write your code where ever you want to do aparticular task

      if you write it in pageload the task is done while loading the page if you move it to button click that particular task is done only when button is clicked

      your question is not clear try to post elaparately so that you can get exact solution

      Comment

      Working...