I'm trying to execute a SP on the button click which also has OnClientClick through which a javascript is triggered. The problem is OnClientClick works properly but OnClick event doesn't get fire at all kindly help.
Javascript
function Redirect_Final()
{
display_inner_dropdown(false);
var Qstring,tid,bid,beid,bdid,r;
var content;
document.form1.method="post";
document.form1.action="Report_Card.aspx";
content = calculate();
content += '<br><table align=center cellpadding=1>'
content += '<tr><td colspan=2 align=left style="color: #FFFFFF; font-family: Arial; font-size: 8pt" bgcolor="#FF0000"><input type=checkbox id=ichk onclick=on_off();> <b>I Accept the above Information.</b> </td></tr>'
content += '<tr>'
content += '<td><input id=ibtnsubmit type=button class=mybutton disabled value="Final Submit" onclick=submitMe();></td>'
content += '<td><input type=button class=mybutton value=Cancel onclick=No_submit();></td>'
content += '</tr></table>'
showDialog('Confirmation',content,Global);
}
function submitMe() {
xmlHttp=ajaxOperation()
username = document.getElementById("hidusername").value;
testid = document.getElementById("hidtestid").value;
str = target + "?type=0&U=" + username + "&T=" + testid;
sendPage(xmlHttp,str);
document.form1.submit();
}
function No_submit()
{
display_inner_dropdown(true)
hideDialog();
}
ASPX code for button
<td style="height: 50px; text-align: right">
<asp:Button ID="btn_Submit" OnClientClick="if (!Redirect_Final()) {return false;}" Text=""
runat="server" CssClass="finishnormal" UseSubmitBehavior="False" Height="30px"
Width="94px" onmouseover="this.className='finishhover'" onmouseout="this.className='finishnormal'"
Style="left: 0px" OnClick="btn_Submit_Click" />
</td>
CS Code
protected void Load_End_Timer()
{
sql = "sp_EndTime_New_LMS_Test '" + hidusername.Value + "'," + hidtestid.Value;
DBCon.Simple_InsUpdDel(sql, 3);
}
protected void btn_Submit_Click(object sender, EventArgs e)
{
Load_End_Timer();
}