Click here to Skip to main content
14,973,807 members

Comments by santosh.yadav198613 (Top 12 by date)

santosh.yadav198613 21-Oct-16 11:54am View
   
Try calling action from Rest Client and check what you are missing
santosh.yadav198613 17-Oct-16 9:37am View
   
No idea what your api suggests, but in most of the cases you need to POST this using webreqest.
santosh.yadav198613 17-Oct-16 9:35am View
   
you can refer below template
$.ajax({
type: "POST",
url: url,
data: data,
success: success,
dataType: dataType
});
santosh.yadav198613 17-Oct-16 7:01am View
   
Check this of it helps
http://javascript.info/tutorial/type-detection
santosh.yadav198613 16-May-16 10:05am View
   
It can be done by adding custom headers, if you are using MVC you can add your own attribute to avoid this.
santosh.yadav198613 16-May-16 10:01am View
   
Without controller it will not work, another way is you can use Attribute Routing.
santosh.yadav198613 16-May-16 9:05am View
   
Thanks, did it by mistake.. Will do the same..
santosh.yadav198613 16-Jan-15 13:22pm View
   
What did you tried so far.
santosh.yadav198613 15-Jan-15 7:55am View
   
Please find the sample, the datasets contains the tables, you need to just define the index of datatable which you want to read.

using (SqlClient sa = new SqlClient(constring))
{
op = sa.GetDataSet(new StringBuilder("[dbo].[usp_getData]"), CommandType.StoredProcedure);

if (op.Success && op.Data != null)
{
banksList = (from b in op.Data.Tables[0].AsEnumerable()
select new EBank
{
BankName = (b.Field<string>("Key") ,
ProgramId = b.Field<int>("value")
}).ToList();

}
}

Let me know if any more help is required.
santosh.yadav198613 15-Jan-15 6:57am View
   
Below is the sample code , and you are right you need to get datatable.
using (SqlClient sa = new SqlClient(constring))
{
op = sa.GetDataTable(new StringBuilder("[dbo].[usp_GetData]"), CommandType.StoredProcedure);

if (op.Success && op.Data != null)
{
banksList = (from b in op.Data.AsEnumerable()
select new EBank
{
BankName = (b.Field<string>("Key"),
ProgramId = b.Field<int>("Value")
}).ToList();

}
}
santosh.yadav198613 15-Jan-15 6:01am View
   
oops sorry did it by mistake.
santosh.yadav198613 15-Jan-15 5:58am View
   
system.data.datasetextensions use this dll into your dataaccesslayer to support IEnumerable.