<script runat="server">
'Private Sub InsertMsg(ByVal msg As String)
' ListBoxEvents.Items.Insert(0, msg)
' ListBoxEvents.SelectedIndex = 0
'End Sub
Private Sub SubmitButton_Click(ByVal sender As Object, ByVal e As EventArgs)
'InsertMsg("You clicked the Submit Button.")
'InsertMsg("You have uploaded " & uploadcount & "/" & Uploader1.Items.Count & " files.")
End Sub
Private uploadcount As Integer = 0
Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)
uploadcount += 1
'InsertMsg("File uploaded! " & args.FileName & ", " & args.FileSize & " bytes.")
'Copys the uploaded file to a new location.
args.CopyTo("C:\\" & Date.Now.ToShortDateString().Replace("/", "") + ".pdf")
'You can also open the uploaded file's data stream.
'System.IO.Stream data = args.OpenStream();
End Sub
Protected Overloads Overrides Sub OnPreRender(ByVal e As EventArgs)
'SubmitButton.Attributes("itemcount") = Uploader1.Items.Count.ToString()
MyBase.OnPreRender(e)
End Sub
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<a href="DefaultPage.aspx" target="_blank">Launch CFN Workflow tool</a><br /><br />
<a href="GetCaseResults.aspx" target="_blank">Launch Results Directly</a>
</div>
<div>
<%--<CuteWebUI:UploadAttachments runat="server" ID="Uploader">
</CuteWebUI:UploadAttachments>--%>
</div>
<div id="divNCO" runat="server" class="Collapse">
<%--<input id="cancelUpload" value="Cancel this upload" onclick="cancel_upload()" />--%>
<table>
<tr>
<td colspan="2" align="left"><textarea id="txtArea" cols="50" rows="10"></textarea></td>
</tr>
<tr>
<td colspan="2" align="left"><asp:RadioButtonList ID="rblNCO" runat='server' CssClass="rblNCO" RepeatDirection="Horizontal">
<asp:ListItem Value="0" Text="Case owner can now resolve this case"></asp:ListItem>
<asp:ListItem Value="1" Text="This is a comment/question"></asp:ListItem>
</asp:RadioButtonList></td>
</tr>
<tr>
<td align="left"><CuteWebUI:UploadAttachments runat="server" ID="Uploader1" ManualStartUpload="true" MaxFilesLimit="3" MaxFilesLimitMsg="You can only upload 3 files at a time" ValidateOption-AllowedFileExtensions="pdf, tif" InsertText="Attach Files" InsertButtonStyle-CssClass="float:left;" OnFileUploaded="Uploader_FileUploaded">
</CuteWebUI:UploadAttachments></td>
<td valign="top">
<asp:Button runat="server" ID="SubmitButton" OnClientClick="return submitbutton_click()"
Text="Submit" OnClick="SubmitButton_Click" />
<asp:Button ID="btnCancelNCODiv" runat="server" text="Cancel" CssClass="FloatRight" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<script type="text/javascript">
function submitbutton_click() {
var submitbutton = document.getElementById('<%=SubmitButton.ClientID %>');
var uploadobj = document.getElementById('<%=Uploader1.ClientID %>');
if (!window.filesuploaded) {
if (uploadobj.getqueuecount() > 0) {
alert("starting upload");
uploadobj.startupload();
alert("done upload");
}
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() {
window.filesuploaded = true;
var submitbutton = document.getElementById('<%=SubmitButton.ClientID %>');
var tmp = '<%=SubmitButton.ClientID %>';
alert('id = ' + tmp);
submitbutton.click();
return false;
}
// function CuteWebUI_AjaxUploader_OnSelect(files) {
// alert("CuteWebUI_AjaxUploader_OnSelect");
// }
</script>