15,611,207 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View Javascript questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10488391 (Top 3 by date)
Member 10488391
19-Feb-15 2:47am
View
Deleted
Select * from csp_license_details where updated_on <> null .
Member 10488391
19-Feb-15 2:41am
View
Have tried by passing the name of .xml file manually ?
Is it Working as expected ?
What data your .xml file contain ?
Member 10488391
30-Dec-13 5:44am
View
Deleted
Its not working in my case?what should I do..
that is my Code in HTMl.
<div id="AddUser" data-bind="ifnot: company()">
<div>
Add New User
</div>
<div>
<label for="name">
Name</label>
<input data-bind="value: $root.name" type="text" title="Name" />
</div>
<div>
<label for="SurName">
Bloomberg Code</label>
<input data-bind="value: $root.bloombergcode" type="text" title="SurName" />
</div>
<div>
<label for="PassportNO">
Sectorid</label>
@* <select id="sector">
<option value="0">Select</option>
<option value="1">Banking</option>
<option value="2">Non-Banking</option>
<option value="3">NBFC</option>
</select>*@
<select id="sector1" data-bind="options:sector,optionsValue:Id,Value:sectorid, optionsCaption: '........Select........', optionsText: 'Name'"></select>
@* <input data-bind="value: $root.sectorid" type="text" title="PassportNo" />*@
</div>
<br />
<div>
<button data-bind="click: $root.create" class="button">
Save</button>
<button data-bind="click: $root.reset" class="button">
Reset</button>
</div>
</div>
and My Knockout code
function copmanyViewModel() {
var self = this;
var Sort = "desc";
//Declare observable which will be bind with UI
self.id = ko.observable("");
self.name = ko.observable("");
self.bloombergcode = ko.observable("");
self.Id = ko.observable("");
var sectordefault = [{ "Id": "1","Name":"Banking"},{ "Id": "2","Name":"Non-Banking"}];
self.sector = ko.observableArray();
self.sectorid = ko.observable();
var company =
{
id: self.id,
name: self.name,
bloombergcode: self.bloombergcode,
sectorid: self.sectorid
};
self.sector(sectordefault);
self.Name = self.sector[1];
self.company = ko.observable();
self.companies = ko.observableArray();
self.create = function () {
alert(this.sectorid());
if (company.name() != "" && company.bloombergcode() != "" && company.sectorid() != "") {
alert('jil');
alert($('#sector1 option:selected').text());
var User1 = self.company();
$.post('@Url.Action("AddUser","Home")', company,
function (result) {
if (result >= 0) {
alert('Not Added');
}
else {
alert('Record Added Successfully');
self.companies(result);
}
}
);
}
else {
alert('Please Fill all the Field');
}
}
i want the selected value at the time when i press the create button...