Ken,
OK, i was able to fix the problem so it works are pure ajax uploader the solution is below. However, i need to restrict it so only one file can be uploaded and i also need to hide the panel that shows you the files i uploaded. i will start another forum for them... thanks
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UploadPanel" runat="server" >
<ContentTemplate>
<script type="text/javascript">
function submitbutton_click() {
alert("submitbutton_click");
var submitbutton = document.getElementById('<%=SubmitButton.ClientID %>');
var uploadobj = document.getElementById('<%=FileUploader1.ClientID %>');
if (!window.filesuploaded) {
if (uploadobj.getqueuecount() > 0) {
uploadobj.startupload();
} else {
var uploadedcount = parseInt(submitbutton.getAttribute("itemcount")) || 0;
if (uploadedcount > 0) {
return true;
}
alert("Please browse files for upload");
}
return false;
}
window.filesuploaded = false;
return true;
}
function CuteWebUI_AjaxUploader_OnPostback() {
alert("OnPostBack");
window.filesuploaded = true;
var submitbutton = document.getElementById('<%=SubmitButton.ClientID %>');
submitbutton.click();
return false;
}
</script>
<CuteWebUI:UploadAttachments ID="FileUploader1" ClientIDMode="Static" MaxFilesLimit="1" runat="server" TempDirectory="~/UploaderTemp" OnUploadCompleted="Uploader1_UploadCompleted" OnFileUploaded="Uploader1_FileUploaded" >
<ValidateOption AllowedFileExtensions=".png,.jpg,.bmp,.jpeg,.gif, ," />
</CuteWebUI:UploadAttachments >
<asp:Button runat="server" ID="SubmitButton" OnClientClick="return submitbutton_click()" Text="Submit" style="display:none;" />
<asp:Label ID="Uploader1_FileUploadedLabel" runat="server" Text="Label"></asp:Label><Br />
<asp:Label ID="Uploader1_UploadCompletedLabel" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SubmitButton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>