16,018,353 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 .NET 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 jj1992 (Top 14 by date)
jj1992
21-Jan-15 3:18am
View
when i put breakpoint in Device Controller post method and run the application it gets hit there with string id null
jj1992
21-Jan-15 3:17am
View
so please help where to define hat in my code
jj1992
21-Jan-15 3:16am
View
i'm using web api for the first time
jj1992
21-Jan-15 2:48am
View
this is my full server side code
================================
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using DeviceCollection.Models;
namespace DeviceCollection.Controllers
{
public class DeviceController : ApiController
{
// GET api/HelloWorld
public IEnumerable<clsdevice> Get()
{
return new clsDevice[] { };
}
// GET api/values/5
public string Get(int id)
{
return null;
}
// POST api/values
public string Post([FromBody] string id)
{
ClsDeviceDL obj = new ClsDeviceDL();
return obj.SaveDevice(id);
}
==============================================
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;
namespace DeviceCollection.Models
{
public class ClsDeviceDL
{
public string SaveDevice(string Value)
{
var jss = new JavaScriptSerializer();
var obj = jss.Deserialize<clsdevice>(Value);
clsDevice objTest = (clsDevice)obj;
string command = @"CALL SP_DeviceMaster( " + objTest.id+ ",'" + objTest.DeviceId+ "','" + objTest.Latitude + "'," + objTest.Longitude + "')";
string returnValue = "Error! Please try again";
DataSet ds = ClsDbTask.GetDataSet(command);
if (ds != null)
{
returnValue="saved Successfully";
}
return returnValue;
}
}
}
jj1992
21-Jan-15 2:38am
View
when i passing the data in client the controller post method in web api gets a null value
jj1992
8-Apr-14 0:56am
View
i have solved it ..............
jj1992
11-Mar-14 3:54am
View
i have done like this but i got only a blank exel page
jj1992
7-Mar-14 3:47am
View
dynamic means programatically......
jj1992
7-Mar-14 3:07am
View
adding an existing file into a project dynamically
jj1992
6-Mar-14 23:31pm
View
thanks
jj1992
6-Mar-14 5:31am
View
i'm a beginer in c# please help
jj1992
6-Mar-14 5:29am
View
please rewrite this code for web application ( for gridview not for datagridview)
jj1992
6-Mar-14 5:28am
View
foreach (DataGridViewColumn col in dataGridView1.Columns)
{
dt.Columns.Add(col.DataPropertyName, col.ValueType);
}
//adding new rows
foreach (DataGridViewRow row in dataGridView1.Rows)
{
DataRow row1 = dt.NewRow();
for (int i = 0; i < dataGridView1.ColumnCount; i++)
//if value exists add that value else add Null for that field
row1[i] = (row.Cells[i].Value == null ? DBNull.Value : row.Cells[i].Value);
dt.Rows.Add(row1);
}
jj1992
6-Mar-14 4:20am
View
thanks..... but i'm working in web application were grid column property doesnot exist
Show More