Friday, 31 January 2020

ASP.NET MVC 3 and the @helper syntax within Razor

When you make a website then sometimes you need to make a reusable HTML component, for example, you want to show testimonial on the various page. For doing this you need to copy-paste testimonial HTML on pages where it is required. The problem arises when any modification is done on Testimonial, You will have to update testimonial manually on every page which is time taking and prone to error.

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();
        }

    }