Posts

Angular 5 using Web api Login authentication

1(How to add comments in Angular 7 Name of components are logincomponent= logincomponent.component.Html < div class = "row" > < input type = "text" [(ngModel)] = "uname" placeholder = "UserName" >< br > < input type = "text" [(ngModel)] = "pwd" placeholder = "password" >< br > < input type = "button" value = "login" (click) = "validateUser(uname,pwd)" > </ div > logincomponent.component.ts import { Component , OnInit } from '@angular/core' ; import { LoginServiceService } from '../login-service.service' ; @ Component ({ selector: 'app-logincomponent' , templateUrl: './logincomponent.component.html' , styleUrls: [ './logincomponent.component.css' ] }) export class LogincomponentComponent { constructor ( private loginservices :...

API Controller GET,PUT,Delete

Image
 public class AuthorController : ApiController     {         GolflerDataModelEntities db = new GolflerDataModelEntities();         public IEnumerable<Author> GetAuthors()         {             return db.Authors.ToList<Author>();         }         [HttpGet]         public Response Details(long id)         {             if (id <= 0)             {                 return new Models.Response { Status = 0, Message = "Valid id is required", Record = null };             }             var author = db.Authors.FirstOrDefault(x => x.Id == id);         ...

Insert Data in database and bind to gridview

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace Prartice1 {     public partial class Registration : System.Web.UI.Page     {         SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);         protected void Page_Load(object sender, EventArgs e)         {             if(!IsPostBack)             {                 GetEmpDetails();             }         }         private void GetEmpDetails()         {             DataTable dt = new DataTable(); ...

Asp net interview questions and answers for 0 to 3 years experience

ASP.Net  1. What is ASP.Net? Why asp.net?  A) 1. ASP.NET is a .NET web technology or Server-side technology.  WHY: To develop a web application by using .Net we have to use a .Net web technology called Asp.Net and a .Net language called C#.Net.    2. What do you mean by server-side technology? 1.  The code which is executing within the WEB SERVER is called as SERVER SIDE CODE.   2. Server-side code we can implement by using Server-side technologies.  Ex. ASP, ASP.NET, JSP, PHP and so on  3. Using server-side technology we can develop server-side web pages .   3. What do you mean by client-side technology?   The code which is executing within the WEB BROWSER is called as CLIENT SIDE  CODE.  Client-side code we can implement by using client-side technologies.  Ex: JavaScript, HTML, CSS   4. What are the programming techniques that will be supporti...
Connection String  SqlConnection con =new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString);         List<string> lst = new List<string>();       private void BindListBox()         {             DataTable dt = new DataTable();             if (con.State != ConnectionState.Open)                 con.Open();             using (SqlCommand cmd = new SqlCommand(@"Select Rid,Name from Tbl_Regi", con))             {                 SqlDataAdapter da = new SqlDataAdapter(cmd);                 da.Fill(dt);                 //listbox1.DataSource = dt;               ...

Popular posts from this blog

Insert Data in database and bind to gridview

Api

Oracle database