-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathView.ascx
More file actions
77 lines (73 loc) · 4 KB
/
View.ascx
File metadata and controls
77 lines (73 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="LinkWise.Modules.OneDrive.View" %>
<div>
<p><asp:Literal runat="server" ID="errors" /></p>
<hr />
<asp:PlaceHolder runat="server" ID="LoginStatus" Visible="false">
<p><asp:Literal runat="server" ID="StatusText" /></p>
</asp:PlaceHolder>
<asp:PlaceHolder runat="server" ID="SignInButton" Visible="false">
<p>Sign in using your Office365 account</p>
<div style="margin-bottom: 10px;">
<div>
<asp:Button runat="server" OnClick="SignIn" Text="Sign in" />
</div>
</div>
</asp:PlaceHolder>
<asp:PlaceHolder runat="server" ID="SignOutButton" Visible="false">
<p>When finished you can sign out</p>
<div style="margin-bottom: 10px;">
<div>
<asp:Button runat="server" OnClick="SignOut" Text="Sign out" />
</div>
</div>
</asp:PlaceHolder>
<asp:PlaceHolder runat="server" ID="Files" Visible="false">
<div style="margin-bottom: 10px;">
<div>
<asp:Button runat="server" OnClick="GetFiles" Text="My Files" />
</div>
</div>
<asp:PlaceHolder runat="server" ID="DownloadSuccess" Visible="false">
<div style="margin-bottom: 10px;">
<p>File downloaded successfully.</p>
</div>
</asp:PlaceHolder>
<asp:PlaceHolder runat="server" ID="DownloadFail" Visible="false">
<div style="margin-bottom: 10px;">
<asp:Label runat="server" ID="failMessage" />
</div>
</asp:PlaceHolder>
<div style="margin-bottom: 10px;">
<asp:Repeater runat="server" ID="MyFiles">
<HeaderTemplate>
<table>
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Size</th>
<th>Type</th>
<th>URL</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# Eval("ItemID") %></td>
<td><%# Eval("ItemName") %></td>
<td><%# Eval("ItemSize") %> bytes</td>
<td><%# Eval("ItemType") %></td>
<td><asp:hyperlink runat="server" Text="Open in OneDrive" NavigateUrl='<%# Eval("ItemURL") %>' Target="_blank" /></td>
<td><asp:Button runat="server" Text="Open" Visible='<%# Convert.ToBoolean(Eval("ItemType").ToString() == "Folder") %>' CommandArgument='<%# Eval("ItemID") %>' CommandName="Open" OnCommand="CommandBtn_Click" /><asp:Button runat="server" Text="Download" Visible='<%# Convert.ToBoolean(Eval("ItemType").ToString() == "File") %>' CommandArgument='<%# Eval("ItemID") %>' CommandName="Download" OnCommand="CommandBtn_Click" /></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:Repeater>
</div>
</asp:PlaceHolder>
</div>