I attempted the following code:
Page.ClientScript.RegisterStartupScript(this.GetType(), "postback", "<script>$(document).ready( function() {__doPostBack('ctl00$ContentPlaceHolder1$PrintExcemptionsButton',''});</script>", false);
Unfortunately, the issue lies in the fact that the code itself does not trigger a postback and click the PrintExcemptionsButton
.
My goal is to simulate a button click programmatically using the __doPostback
method in C#.
I would greatly appreciate any assistance with this matter.