Hi,
I had a javascript prompt box which is being displayed upon some business validations and when the user clicks ok, I was trying to fire click event of a button to perform insert operation but I am unable to find the ID of the button, I am registering the javascript in code behind using scriptmanager.registerstartupscript, my web page has a master page, radgrid, update panel, radloadingpanel.
below is the code where i am trying to pull the ID of the button.
Also I am unable to find the hidden field id as well
I am doing this so as to perform an insert operation based on the response from user. Hence trying to fire a click event and perform insert operation in it.
I am registering the javascript in insert command event. I must be missing something eay here but unable to find it, Anyhelp would be greatly appreciated.
I had a javascript prompt box which is being displayed upon some business validations and when the user clicks ok, I was trying to fire click event of a button to perform insert operation but I am unable to find the ID of the button, I am registering the javascript in code behind using scriptmanager.registerstartupscript, my web page has a master page, radgrid, update panel, radloadingpanel.
below is the code where i am trying to pull the ID of the button.
| Dim js As String |
| js = _ |
| " var promptpromptComments=prompt(Validation failed, still want to proceed','Comments...');" & _ |
| " if(promptComments!=null && promptComments!='')" & _ |
| " {" & _ |
| " document.getElementById('<% InsertRecord.ClientID %>').click;" & _ |
| " document.getElementById('InsertCmtsHdnFld').value=promptComments;" & _ |
| " } " & _ |
| " else" & _ |
| " {" & _ |
| " alert('insert has been terminated');" & _ |
| " }" |
| ScriptManager.RegisterStartupScript(Me, GetType(Page), "PromptScript", js, True) |
I am doing this so as to perform an insert operation based on the response from user. Hence trying to fire a click event and perform insert operation in it.
I am registering the javascript in insert command event. I must be missing something eay here but unable to find it, Anyhelp would be greatly appreciated.