Posts

Mobile number already exist or not in C#

  mobile number already exists Private bool CheckMobNoExistOrNot (string MobileNo)         {             bool ReturnVal = false;             try             {                 if (objCon.State != ConnectionState.Open)                     ObjCon.Open();                 using (SqlCommand cmd = new SqlCommand("select COUNT(*) from tablename where ContactNo=@MobNo ", ObjCon))                 {                     cmd.Parameters.AddWithValue("@MobNo", MobileNo);                     object Obj = cmd.ExecuteScalar();                     if (Obj != ...

How to Create Dynamic Table in C#

 Create a DataTable object Add Columns Using Add Method Create the object on Row DataTable objdt  = new DataTable();                         dtUnits.Columns.Add("ABCNo",typeof(string));                         dtUnits.Columns.Add("UserName", typeof(string)); var row = objdt  .NewRow();                                 row["ABCNo"] =   ItemNO;                                 row["UserName"] = Aranav;                                 dtUnits.Rows.Add(row);

How to get IP Of Client machine in ASP.Net

IP Of Client machine the following function is used to get IP of Client Machine Public string GetIPOfClient()         {             string returnvalue = string.Empty;             try             {                 System.Web.HttpContext context = System.Web.HttpContext.Current;                 string ip = context.Request.ServerVariables[" HTTP_X_FORWARDED_FOR "];                 returnvalue = context.Request.ServerVariables[" REMOTE_ADDR "];                 if (!string.IsNullOrEmpty(ip))                 {                     string[] addresses = ip.Split(',');           ...

refreshing data without page refresh in Angular 7

Refreshdata() { this.datarefresher=SetInterval(() =>{ },30000); }

new row create using array in Angular 7

Create html button  Call click event  Create on two array  Example  Rack:any newAttribute:any={}; <button class="add" (click)="Addnewrow()">Add</button> Function- Addnewrow(){ this.rack.push(this.newAttribute) this.NewAttribute={}; }

Popular posts from this blog

String Program in C#

Api

Oracle database