Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. <table class="newCustButton" width="100%" cellpadding="10" cellspacing="10" border="1">
  2. <tr>
  3. <td align="center" width="48%">
  4. <asp:Image ID="image01" runat="server" Width="100%" Height="300" onError="this.onerror=null;this.src='/resource/altImage.png';"/>
  5. <div align="right">
  6. <asp:FileUpload ID="image01_update" runat="server" onchange="showPreview(this);" style="float:left;"/>
  7. <asp:Button ID="image01_approve" runat="server" Class="btn btn-danger btn-default-color btn-sm" Text="Approve" CausesValidation="true" ValidationGroup="DetailsGroup" CommandArgument="img_01" OnCommand="btnApprovePropertyImage_Click" />
  8. <asp:Button ID="image01_disapprove" runat="server" Class="btn btn-danger btn-default-color btn-sm" Text="Disapprove" CausesValidation="true" ValidationGroup="DetailsGroup" CommandArgument="img_01" OnCommand="btnDisApprovePropertyImage_Click" />
  9. <asp:Button ID="image01_delete" runat="server" Class="btn btn-danger btn-default-color btn-sm" Text="Delete" CausesValidation="true" ValidationGroup="DetailsGroup" CommandArgument="img_01" OnCommand="btnDeletePropertyImage_Click" />
  10. </div>
  11. </td>
  12.  
  13. <td width="4%"></td>
  14.  
  15. <td align="center" width="48%">
  16. <asp:Image ID="image02" runat="server" Width="100%" Height="300" onError="this.onerror=null;this.src='/resource/altImage.png';"/>
  17. <div align="right">
  18. <asp:FileUpload ID="image02_update" runat="server" onchange="showPreview(this);" style="float:left;" />
  19. <asp:Button ID="image02_approve" runat="server" Class="btn btn-danger btn-default-color btn-sm" Text="Approve" CausesValidation="true" ValidationGroup="DetailsGroup" CommandArgument="img_02" OnCommand="btnApprovePropertyImage_Click" />
  20. <asp:Button ID="image02_disapprove" runat="server" Class="btn btn-danger btn-default-color btn-sm" Text="Disapprove" CausesValidation="true" ValidationGroup="DetailsGroup" CommandArgument="img_02" OnCommand="btnDisApprovePropertyImage_Click" />
  21. <asp:Button ID="image02_delete" runat="server" Class="btn btn-danger btn-default-color btn-sm" Text="Delete" CausesValidation="true" ValidationGroup="DetailsGroup" CommandArgument="img_02" OnCommand="btnDeletePropertyImage_Click" />
  22. </div>
  23. </td>
  24. </tr>
  25.  
  26. <tr> another two image uploaders are here with same code but with different ID's</tr>
  27.  
  28. function showPreview(input) {
  29. if (input.files && input.files[0]) {
  30. var reader = new FileReader();
  31. reader.onload = function (e) {
  32. $(input).prev().css('visibility', 'visible');
  33. $(input).prev().attr('src', e.target.result);
  34. }
  35. reader.readAsDataURL(input.files[0]);
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement