Adam, cutechat, thanks for your replys!
OK, so I see. But suppose I use Microsoft AJAX and sending a server request is ok performance wise but I need to distinguish the event generated by the file upload from other events that causes post back so that I can direct my code behind depending on which control that is causing the post back, how do I manage that? The "IsPostBack" property is "not enough" so to speak, I need to know which control is "throwing" the event so that I can act accordingly directly when "Page_Load" occurs. Can I do that?
When I have added a "protected void UploadAttachments1_AttachmentAdded(object sender, CuteWebUI.AttachmentItemEventArgs args)" event handler to my code behind this event is catched after the "Page_Load" and because I have code in the "Page_Load" that I dont want to execute when a file upload occurs I would somehow to know that it is the file upload that has caused the new "Page_Load".
As you see I don't know anything about asp.net but I would highly appreciate any answer to this "generic" asp.net functionality question.
EDIT: Achieved the desired functionality using:
string ctrlname = Page.Request.Params.Get("__EVENTTARGET");
if (ctrlname != null && ctrlname.Equals("UploadAttachments1"))
{
return;
}
Thanks!
Regards,
Niclas