Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8020089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:35:25+00:00 2026-06-04T21:35:25+00:00

Practically I don’t need it. But a little curiosity is running on my mind

  • 0

Practically I don’t need it. But a little curiosity is running on my mind as my event handler function written for running in the server is not called. I have dragged a html button element and put it inside the form element with attribute runat=”server”

Now if I double click on the button inside design view, it redirects me to a javascript block on which the event handler function is created. I erased it and write my own in the code behind file. Now when run the page on the server and click on the button, the event handler function is not called.

I want it to be run. Any way ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:35:26+00:00Added an answer on June 4, 2026 at 9:35 pm

    You are confusing between two different events: the onclick provided in the editor is the client side click event, handled with javascript code.

    The server side, c# based event handler can be added to such a button if you markup it with

    runat="server" 
    

    ,attribute and add a server side handler to it (assuming Button1 is the id of your button)

    Button1.ServerClick += new EventHandler(Button1_ServerClick);
    

    the markup for the html input doesnt expose the server side event to add a handler through the markup, but you can add the code i pasted above within your page_load/init events

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok I know this practically sounds elementary, but I don't understand what I'm not
Not that I would want to use this practically (for many reasons) but out
I'm looking to add a click handler to a div. But is there a
I'm practically new to Objective C and iOS Dev and I need to make
Practically, I don't understand the use of the sBIT chunk in an PNG file.
I'm not sure if this is practically possible with SQL (I'm using MS SQL
I've been doing server-side development for several years, and have not had much (read
I have practically no knowledge of Matlab, and need to translate some parsing routines
I don't understand how to apply CGAffineTransform parameter that appears in practically every CGPath
This question is just for a sake of knowledge. I don't have any practical

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.