Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. <asp:DataList ID="DataList1" runat="server" DataKeyField="AppId" DataSourceID="TestDB" RepeatColumns="1">
  2. <ItemTemplate>
  3. AppId:
  4. <asp:Label ID="AppIdLabel" runat="server" Text='<%# Eval("AppId") %>' />
  5. <br />
  6. ToonName:
  7. <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
  8. <br />
  9. AppStatus:
  10. <asp:Label ID="AppStatusLabel" runat="server" Text='<%# Eval("AppStatus") %>' />
  11. <br />
  12. <br />
  13. </ItemTemplate>
  14. </asp:DataList>
  15. <asp:SqlDataSource ID="TestDB" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Applications] WHERE ([AppId] = @AppId)">
  16. <SelectParameters>
  17. <asp:QueryStringParameter Name="AppId" QueryStringField="btnView" Type="Int32" />
  18. </SelectParameters>
  19. </asp:SqlDataSource>
  20.  
  21. <form>
  22. <div id="grid">
  23. @grid.GetHtml(
  24. tableStyle : "grid",
  25. alternatingRowStyle : "alt",
  26. headerStyle : "header",
  27. columns: grid.Columns(
  28. grid.Column("AppId", "Action", format: @<text>
  29. <button type="submit" class="view-app" id="@item.AppId" name="btnView" value="@item.AppId">View</button>
  30. <button type="submit" class="approve-app" id="@item.AppId" name="btnApprove" value="@item.AppId">Approve</button>
  31. <button type="submit" class="deny-app" id="@item.AppId" name="btnDeny" value="@item.AppId">Deny</button>
  32. <button type="submit" class="delete-app" id="@item.AppId" name="btnDelete" value ="@item.AppId">Delete</button>
  33. </text>),
  34. grid.Column("Name", "Name"),
  35. grid.Column("AppDate", "AppDate"),
  36. grid.Column("AppStatus", "Status")
  37. )
  38. )
  39. </div>
  40. </form>
  41. <br />
  42. <fieldset>
  43. <legend>Applicant Answers</legend>
  44. <iframe id="ff" width="100%" height="50px" frameborder="0" scroll="yes" src="Applicant.aspx"></iframe>
  45. </fieldset>
  46.  
  47. <fieldset>
  48. <legend>Applicant Answers</legend>
  49. <script type="text/javascript">
  50. function ShowDetail(appId) {
  51. document.getElementById("ff").src ="Applicant.aspx?AppId=" + appId;};
  52. </script>
  53. <iframe id="ff" width="300" height="300"></iframe>
  54. </fieldset>
  55.  
  56. <button type="button" onclick="ShowDetail(this.value)" class="view-app" id="@item.AppId" name="btnView" value="@item.AppId">View</button>
  57.  
  58. <script type="text/javascript">
  59. function ShowDetail(appId) {
  60. document.getElementById("ff").src = "Applicant.aspx?AppId=" + appId;
  61. }
  62. </script>
  63.  
  64. ....
  65. <button type="button" onclick="ShowDetail(this.value)" class="view-app" id="@item.AppId" name="btnView" value="@item.AppId">View</button>
  66. ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement