Advertisement
|
[x]
Attachment Details
|
||
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: |
---Update Panel on .aspx page----
<asp:UpdatePanel ID="filePanel" updateMode="Conditional" runat="server">
<ContentTemplate>
<div style="width: 450px; height: 300px; overflow-y: auto; overflow-x: hidden; padding: 5px;">
<asp:DataList ID="FileList" runat="server" DataKeyField="FileName">
<ItemTemplate>
<div style="float: left; width: 185px;border: dotted 1px #c9c9c9;text-align: center; vertical-align:middle;margin: 2px; padding: 4px 0px 4px 0px;">
<asp:ImageButton
ID="PicDelete"
runat="server" CommandName="delete"
ImageUrl="img/delete_icon.gif" />
<i><%#Eval("LighteningFileType")%><br /></i>
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender2" TargetControlID="PicDelete" ConfirmText="This cannot be undone. Are you sure?" runat="server" />
<a href="javascript: showPopImage('<%# Eval("FileGUID") %>', <%# Eval("LighteningFileTypeID") %>)">
<asp:Image
ID="Image1"
runat="server"
Width='<%#getImageWidth(Eval("LighteningFileTypeID")) %>'
ImageUrl='<%# getImageUrl(Eval("LighteningFileTypeID"), Eval("FileExtension").ToString(), Eval("FileGUID").ToString()) %>'
AlternateText='<%# Eval("FileName") %>'/>
</a>
<asp:Label ID="filetype" Text='<%# FileNamePresentation(Eval("LighteningFileTypeID"), Eval("FileName"), Eval("FileGUID").ToString()) %>'
runat="server"/>
</div>
</ItemTemplate>
</asp:DataList></div>
</ContentTemplate>
</asp:UpdatePanel>
----event handler in code-behind .aspx.vb page---------
Protected Sub PictureDelete(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles FileList.ItemCommand
If e.CommandName = "delete" Then
Dim fguid As String = FileList.DataKeys(e.Item.ItemIndex).Value.ToString()
Dim lf As New LightningFixes()
lf.DeleteLightingFile(fguid)
'this removes the file from the FileStoreWebService database
Dim fd As New DeleteFileFromWebService(fguid)
lf.GetALLLightningFiles(_pid)
filePanel.Update()
If lf.LightningFiles.Tables(0).Rows.Count <> 0 Then
hideShowFileSections("show")
Else
Response.Redirect("Lightning.aspx?ProjectID=" & _pid)
End If
End If
End Sub
|
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
|
Loading Advertisement... |