ScriptManager.RegisterStartupScript(this, this.GetType(), "myalert", "alert('File already exists.');", true);
Check this pseudo-code First we need to send a postback with __doPostBack, on the control using uniqueID then on server side just add the rowCommand event handler, and at the ASPX put the Page.EnableEventValidation as false. Client Side In ASPX <%@ Page EnableEventValidation="false" ... -------------------------------------------------- In JavaScript <script> function deleteFile(paramID) { if (paramID>0) { __doPostBack('<%=GridView1.UniqueID%>', 'COMMAND_TO_FIRE$' + paramID); } } </script> -------------------------------------------------- On Server Side protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("COMMAND_TO_FIRE") ) {
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)