EDIT1:
btnDelete.Attributes.Add("onclick", String.Format(@"return DeleteRow('{0}',{1},{2},{3});", e.Row.ClientID, e.Row.RowIndex, DataBinder.Eval(e.Row.DataItem, "Id"), "'" + DataBinder.Eval(e.Row.DataItem, "Name") + "'"));
edit:
i get this error:
Message: Unterminated string constant
i am passing the value from code behind and some of my text have somethinh lke this:
Foo3, In.c
//javascript
function DeleteRow(rowId, rowIdx, Id, Name) {
var textForMessage = "return confirm('Are you sure you want to delete this record with the name: \n{0} \n{1}');";
//removed code...
return result;
}
Foo3, In.cthen where is this value passed? Even if it is passed as one of the parameters, you are not doing anything with them... Please provide a more complete/correct/whatever example.