.NET Daily

__doPostBack not trigger the Button Click event

Introduction

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.


LATEST POSTS

How to Deliver Accurate Project Status Reports 21st April, 2018

JIRA Workflow for Web Development Example: Simple and Effective 17th April, 2018

Common .NET Exceptions

__doPostBack not trigger the Button Click event

Posted on .

Problem 1: You call __doPostBack javascript function to trigger a click event of a button but the event is not executed although Page_Load event is triggered;

Resoulution of Problem 1:

You probably used something like this:

__doPostBack('<%=btnButton.ClientID %>', "");

Instead, you should use something like this:

__doPostBack('<%=btnButton.UniqueID %>', "");

So if you noticed, you need to send the UniqueID of the button, not the ClientID.

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

There are no comments.

View Comments (0) ...
Navigation

Privacy Preference Center