<asp:FileUpload ID="fuPhoto" runat="server" ToolTip="选择图片" />
<asp:LinkButton ID="lbUploadPhoto" runat="server" OnClick="lbUploadPhoto_Click" ></asp:LinkButton>
if(!IsPostBack)
{
fuPhoto.Attributes.Add("onchange", "javascript:__doPostBack(‘" + lbUploadPhoto.ClientID.Replace("_","$") + "‘,‘‘)");
}
原文:http://www.cnblogs.com/pengfeiwang/p/4372711.html