c# - button not triggering as required -
my button not automatically triggering, works when click manually,
<script type="text/javascript"> $(document).ready(function() { $('#yes').click(function() { $.unblockui(); $('<%= hiddenbutton.clientid %>').trigger('click'); // not working __dopostback('<%=hiddenbutton.clientid %>', ''); // not working
button code given below. both trigger , dopostback didn't worked @ all
<asp:updatepanel id="updatepanel1" runat="server" updatemode="conditional" childrenastriggers="true"> <contenttemplate> <asp:textbox id="hiddenfield1" runat="server" /> <asp:button id="hiddenbutton" text="click me" runat="server" onclick="deleting_click" />
and added trigger as,
<triggers> <asp:asyncpostbacktrigger controlid="hiddenbutton" eventname="click" /> </triggers>
i know can check value in page load method , call method there want using java script. can somone direct me in right direction please
try :
$('#<%= hiddenbutton.clientid %>').trigger('click');
you forgot hashtag indicating you're targetting id...
Comments
Post a Comment