Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | None | 0 0
  1. Server Error in '/' Application.
  2.  
  3. The resource cannot be found.
  4. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily Requested URL: /Webogin/Welcome
  5.  
  6.  
  7. Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2110.0 unavailable.  Please review the following URL and make sure that it is spelled correctly.
  8.  
  9. /// <reference path="../angular.min.js" />
  10.  
  11.  
  12.  
  13. var app = angular.module("WebClientModule", [])
  14.  
  15. .controller('Web_Client_Controller', ["$scope", 'myService', function ($scope, myService) {
  16.  
  17. $scope.OperType = 1;
  18. //1 Mean New Entry
  19.  
  20. //To Clear all input controls.
  21. function ClearModels() {
  22. $scope.OperType = 1;
  23. $scope.Username = "";
  24. $scope.Password = "";
  25.  
  26. }
  27.  
  28.  
  29. $scope.createuser = function () {
  30. var User = {
  31. Username: $scope.Username,
  32. Password: $scope.Password
  33.  
  34. };
  35. if ($scope.OperType === 1) {
  36. var promisePost = myService.post(User);
  37. promisePost.then(function (pl) {
  38. $scope.User_Id = pl.data.User_Id;
  39. window.location.href = "~/Webogin/Welcome";
  40.  
  41. ClearModels();
  42. }, function (err) {
  43. $scope.msg = "Password Incorrect !";
  44. console.log("Some error Occured" + err);
  45. });
  46. }
  47. }
  48. }]);
  49.  
  50. app.service("myService", function ($http) {
  51. //Create new record
  52. this.post = function (User) {
  53. var request = $http({
  54. method: "post",
  55. url: "http://localhost:52098/HalifaxIISService.svc/AddNewUser",
  56. data: User
  57. });
  58. return request;
  59. }
  60.  
  61. })
  62.  
  63. @{
  64. Layout = null;
  65. }
  66.  
  67.  
  68. <html data-ng-app="WebClientModule">
  69. <head title="ASAS">
  70. <title></title>
  71. <script src="~/Scripts/angular.min.js"></script>
  72.  
  73. <script src="~/UserLoginScript/CreateUserScript.js"></script>
  74.  
  75. </head>
  76. <body>
  77. <table id="tblContainer" data-ng-controller="Web_Client_Controller">
  78. <tr>
  79. <td>
  80. <table style="border: solid 2px Green; padding: 5px;">
  81. <tr style="height: 30px; background-color: skyblue; color: maroon;">
  82. <th></th>
  83. <th>ID</th>
  84. <th>Username</th>
  85. <th>Password</th>
  86.  
  87. <th></th>
  88. <th></th>
  89. </tr>
  90. <tbody data-ng-repeat="user in Users">
  91. <tr>
  92. <td></td>
  93. <td><span>{{user.User_Id}}</span></td>
  94. <td><span>{{user.Username}}</span></td>
  95. <td><span>{{user.Password}}</span></td>
  96.  
  97. <td>
  98. <input type="button" id="Edit" value="Edit" data-ng-click="get(user)" />
  99. </td>
  100. <td>
  101. <input type="button" id="Delete" value="Delete" data-ng-click="delete(user)" />
  102. </td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>
  110. <div style="color: red;">{{Message}}</div>
  111. <table style="border: solid 4px Red; padding: 2px;">
  112. <tr>
  113. <td></td>
  114. <td>
  115. <span>User ID</span>
  116. </td>
  117. <td>
  118. <input type="text" id="User_Id" readonly="readonly" data-ng-model="User_Id" />
  119. </td>
  120. </tr>
  121. <tr>
  122. <td></td>
  123. <td>
  124. <span>Username</span>
  125. </td>
  126. <td>
  127. <input type="text" id="username" data-ng-model="Username" required=""/>
  128. </td>
  129. </tr>
  130. <tr>
  131. <td></td>
  132. <td>
  133. <span>Password</span>
  134. </td>
  135. <td>
  136. <input type="password" id="password" required data-ng-model="Password" require=""/>
  137. </td>
  138. </tr>
  139.  
  140. <tr>
  141. <td></td>
  142. <td></td>
  143. <td>
  144. <input type="button" id="Createuser" value="Submit" data-ng-click="createuser()" />
  145. <input type="button" id="Clear" value="Clear" data-ng-click="Clear()" />
  146. </td>
  147. </tr>
  148. </table>
  149. </td>
  150. </tr>
  151. </table>
  152. </body>
  153. </html>
  154. <script src="~/UserLoginScript/CreateUserScript.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement