I have a C # function in which I would like to call / run some JavaScript:
protected void DetailsView1_DataBound(object sender, EventArgs e) {
...
...
}
I am dealing with a form, in particular with submitting a form. After you click Submit, several C # functions are launched that perform validation and other miscellaneous tasks. After that I need to run JavaScript, but I had problems synchronizing these events. JavaScript:
...
if (uploader.total.uploaded == 0) {
if (uploader.files.length > 0) {
uploader.start();
}
e.preventDefault();
}
...
The way I tried to do this was to detect the click event on the submit button through jQuery and run my Javascript, but then the form itself is not submitted. I tried variations of this, but I had no luck.
, ? "RegisterClientScript" , ? , JavaScript Load ""? , ?
, .
UPDATE
... :
<asp:CommandField ValidationGroup="request" ButtonType="Image"
CancelText="Reset" CancelImageUrl="../images/internal/btn_reset.gif"
InsertImageUrl="../images/internal/btn_insert.gif" ShowEditButton="True"
ShowInsertButton="True" />
2 , - "", "".
,