Friday 31 January 2020

Consume Get API

Consume get API from ASP.Net using PHP


This post will help you to know how can you consume a get Api. Api in this post is made through ASP.Net C# which will be consumed by core PHP.

Data Model


Field
Description
ID
Row ID (Auto Increment)
NotesText
Text of notification
NotesType
Attachment Type (Text,Link,File)
Path
Location of Attachemntq
ClassID
Class Name
NewGIF
Description: http://ankuram.probuzzmedia.com/Image/Page/new.gif
CreateDate
Created Date


<table border="1" cellpadding="3" cellspacing="0">
                <tr>
                                <th>Sr No.</th>
                                <th>Notes Text</th>

Tuesday 28 January 2020

News Ticker


Ticker using HTML and CSS



Latest News

Lorem
ipsum
datom


CSS


.g-news {
            border: solid 1px #ffb600;
            height: 300px;
            width:300px;
        }

Thursday 23 January 2020

POST API ASP.Net

POST API ASP.Net C# (MVC)

API Controller


public class MyapiController : ApiController
    {
        // GET api/myapi
        public MyapiController() { }
     
        // POST api/myapi
      
        public IHttpActionResult Postdata([FromBody] NotificationModel data)
        {
            UserRepository obj = new UserRepository();
            string ErrMsg="";
            obj.AddNotesDB(data, ref ErrMsg);
            return Ok();
        }

    }

Monday 20 January 2020

Return JSON Object from API Controller

Return JSON Object from API Controller ASP.Net C# (MVC)


public IHttpActionResult GetNotification()
        {
            UserRepository ob = new UserRepository();
            List<NotificationAPIModel> data = new List<NotificationAPIModel>();
            data = ob.GetNotificationAPI("0", "2");