TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
priyanka
NA
215
123k
asp Textbox value lost on postback using angularjs in c#
May 26 2017 3:29 AM
I want to find sum of two value and put the value in third textbox using angular js,
no doubt code is working ,but typed value in textbox gets disappear after few second.
So,will u please suggest me why it's happen and provide me some working code.
My code working code is as follows:
<script type="text/javascript>
angular.
module
(
'myApp'
, [])
.
controller
(
'myCtrl'
, [
'$scope'
,
function
($scope) {
$scope.
myFunc
=
function
() {
$scope.
third
=parseFloat(
$scope.
first
)+parseFloat(
$scope.
second
);
};
}]);
</script>
<form ng-app="myApp" ng-controller="
myCtrl
">
<asp:TextBox ID="txtFirst" runat="server" ng-model="first">
<asp:TextBox ID="txtSecond" runat="server" ng-model="second">
<asp:TextBox ID="txtThird" runat="server" ng-model="third">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" ng-click="
myFunc()
" />
</form>
Reply
Answers (
5
)
Generate logo and text in same line in Itextsharp pdf
How to generate a students report card in crystal reports