我有一个包含文件上传按钮的网络表单。asp.net jquery newbie问题
当我点击按钮上传文件时,后面的C#代码包含事件处理程序中的一些代码,我想在jQuery执行之前执行第一个。
<script>
$(document.ready() {
$('.uploadButton').click(function() {
// do some additional processing *AFTER* code behind stuff executes
});
}
</script>
// In my ASP.NET C# code behind
protected void uploadButton_Click(object sender, EventArgs e)
{
// Code to fire off here *FIRST* before jquery executes
}
是这样的可能吗?我知道我可以在我的javascript中实现一个jQuery文章,但由于我已经布置了大部分代码(并且正在对客户端请求进行更改),所以我只是想知道是否可以这样做。