This is the screenshot of error
i just want to call btn click method when user press enter after entering data into textbox
This is the screenshot of error
i just want to call btn click method when user press enter after entering data into textbox
Do put logic in the event handler methods. Create separate functions and call them instead. Anything else is just bad design and even if there is a way to do it, don't start using bad practices from start.