15,892,059 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 C++ questions
View Javascript questions
View Visual Basic questions
View Python 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 Ajit Kumar Pandit (Top 29 by date)
Ajit Kumar Pandit
27-Mar-17 8:10am
View
Deleted
Your idea helps me and I have got my solution. I really appreciate your knowledge about technology. Thank you so much Jochen Arndt.
Ajit Kumar Pandit
27-Mar-17 8:06am
View
Thanks for your greatness. Yah, your response helps me more. Thanks.
Ajit Kumar Pandit
18-Mar-17 8:30am
View
Alright Vivek, take it easy. Thanks for your response.
Ajit Kumar Pandit
18-Mar-17 2:22am
View
Hi Vivek thank you for helping, I'm still confused, would you please explain in more details with a simple example? Thanks.
Ajit Kumar Pandit
10-Mar-17 3:57am
View
Hello sir, I change
--------------------
type:'PUT' to type:'POST' and it is working fine.
Ajit Kumar Pandit
10-Mar-17 2:57am
View
In my case, i am not facing any problem with Selecting, adding, or deleting, but getting problem during updating. Would you please take a look on below ajax calling to update View Model?
--------------------------------------------------
// Update Product Details
self.update = function () {
var Product = self.Product();
var id = Product.Id;
console.log(Product);
console.log(id);
if (Product.Name != "" & Product.Price != "" & Product.Category != "") {
$.ajax({
url: 'Product/UpdateProduct',
cache: false,
type: 'PUT',
contentType: 'application/json; charset=utf-8',
//data: ko.toJSON(id, Product),
data: { id: id, Product: Product },
success: function (data) {
self.Products.removeAll();
self.Products(data); // Put the response in observableArray
self.Product(null);
alert('Record has been updated successfully!');
}
}).fail(function (xhr, textStatus, err) {
alert(err);
});
}
else {
alert('Empty fields are not allowed!');
}
}
Ajit Kumar Pandit
10-Mar-17 2:38am
View
I am passing the same(two parameters) still getting the same issue. I have shown you all my codes on the above.
Ajit Kumar Pandit
10-Mar-17 2:24am
View
I have tried your solution, but it is also throwing me with the same error. I have been trying to resolved it from day after yesterday, but still feeling helpless. Thanks for all your responses.
Ajit Kumar Pandit
10-Mar-17 2:11am
View
I mean id is a local variable and Id is global variable
Ajit Kumar Pandit
10-Mar-17 2:07am
View
Yes, only Id and id are different.
Ajit Kumar Pandit
10-Mar-17 1:37am
View
var Product = {
Id: self.Id,
Name: self.Name,
Price: self.Price,
Category: self.Category
};
Ajit Kumar Pandit
10-Mar-17 1:27am
View
Error
-----------
PUT XHR http://localhost:58258/Product/UpdateProduct [HTTP/1.1 404 Not Found 2ms]
--------------------------
When I click on the above link, it shows following error
-------------------------------------------------
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.JsonResult UpdateProduct(Int32, MvcWithKnockoutJS.Models.TblProductList)' in 'MvcWithKnockoutJS.Controllers.ProductController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters
Ajit Kumar Pandit
10-Mar-17 1:26am
View
Following line
------------------------------
// Update Product Details
self.update = function () {
var Product = self.Product();
var id = Product.Id;
console.log(id);
if (Product.Name != "" & Product.Price != "" & Product.Category != "") {
$.ajax({
url: 'Product/UpdateProduct',
cache: false,
type: 'PUT',
contentType: 'application/json; charset=utf-8',
data: ko.toJSON(Product),
success: function (data) {
self.Products.removeAll();
self.Products(data); // Put the response in observableArray
self.Product(null);
alert('Record has been updated successfully!');
}
}).fail(function (xhr, textStatus, err) {
alert(err);
});
}
else {
alert('Empty fields are not allowed!');
}
}
Ajit Kumar Pandit
9-Mar-17 6:56am
View
Alright sir, would you please let me know some examples/references using SignalR because I am very new in this case? Thank you.
Ajit Kumar Pandit
8-Mar-17 3:54am
View
Thanks
Ajit Kumar Pandit
8-Mar-17 3:54am
View
Alright sir. I have got the solution. Thanks.
Ajit Kumar Pandit
7-Mar-17 7:24am
View
Yes, I have seen that. Thanks.
Ajit Kumar Pandit
7-Mar-17 5:09am
View
Hahaha... Good joke. I like these types of communications.
Ajit Kumar Pandit
7-Mar-17 5:08am
View
Thank you. It seems like disable buttons that's why I have not noticed that. I'll do.
Ajit Kumar Pandit
6-Mar-17 7:06am
View
I am happy what explanation given by both of you.
Ajit Kumar Pandit
6-Mar-17 6:14am
View
I have got my points after reading all above explanations. Thank you Andy Lanng.
Ajit Kumar Pandit
6-Mar-17 6:12am
View
Thanks a lot sir.
Ajit Kumar Pandit
6-Mar-17 6:10am
View
Thank you Karthik.
Ajit Kumar Pandit
6-Mar-17 5:08am
View
Yes, but not getting it very clearly. Would you please help me and explain views in mvc? I am highly thankful for you.
Ajit Kumar Pandit
6-Mar-17 0:00am
View
Thank you Richard..
Ajit Kumar Pandit
4-Mar-17 4:58am
View
But there said that "While showing the card over the RFID reader", Card ID automatically display withing the TextBox.
Ajit Kumar Pandit
4-Mar-17 4:33am
View
Yes, you are very correct.
I am using following reference to read Card IDs
http://www.c-sharpcorner.com/blogs/rfid-programming1
but getting an error in following code block
private void RFID_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if (txttag.Text.Length >= 12)
{
RFID.Close();
}
else
{
DispString = RFID.ReadExisting();
// Getting error on below this.Invoke method
this.Invoke(new EventHandler(DisplayText));
}
}
Error - 'MainWindow' does not contains a definition for 'Invoke' and no extension method 'Invoke' accepting a first argument of type 'MainWindow' could be found(are you missing a using directive or an assembly reference?)
Ajit Kumar Pandit
4-Mar-17 3:56am
View
Manufacture is YUMDATTO
Ajit Kumar Pandit
4-Mar-17 3:49am
View
Any documentations/references/APIs are not given by the manufacturer. I really need some help in this situation.
Show More