Skip to content

ErcanOPAK.com

  • ASP.Net WebForms
  • ASP.Net MVC
  • C#
  • SQL
  • MySQL
  • PHP
  • Devexpress
  • Reportviewer
  • About

Author: ErcanOPAK

SQL

How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL

- 09.04.21 - ErcanOPAK comment on How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL

If you only want to match N” as an empty string SELECT COLUMN FROM TABLE WHERE DATALENGTH(COLUMN) > 0 If you want to count any string consisting entirely of spaces as empty SELECT COLUMN FROM TABLE WHERE COLUMN <> ” If you want to use DATALENGTH for any string consisting entirely of spaces then you […]

Continue Reading ..
JavaScript

How to auto-scroll or manually to end of div when data is added

- 15.01.21 - ErcanOPAK comment on How to auto-scroll or manually to end of div when data is added

Auto-Scroll (every 5 seconds) window.setInterval(function() { var element = document.getElementById(“myDiv”); element.scrollTop = element.scrollHeight; }, 5000);

Continue Reading ..
SQL

Filter Rows By Max Date in SQL

- 13.01.21 - ErcanOPAK comment on Filter Rows By Max Date in SQL

SELECT m1.Column1, m1.Column2, m1.Column3, r.MaxTime FROM ( SELECT Column1, MAX(TimeColumn) as MaxTime FROM MyTable GROUP BY Column1 ) r INNER JOIN MyTable m1 ON m1.Column1= r.Column1AND m1.TimeColumn = r.MaxTime

Continue Reading ..
C#

How to Validate a DateTime in C#?

- 03.01.21 - ErcanOPAK comment on How to Validate a DateTime in C#?

DateTime myDate; if(DateTime.TryParse(txtBirthDate.Text, out myDate)) { //Valid Date } else { //Invalid Date }

Continue Reading ..
C#

Convert comma separated string into a List in C#

- 03.01.21 | 03.01.21 - ErcanOPAK comment on Convert comma separated string into a List in C#

string myList = “9,3,12,43,2”; List<int> intList = myList.Split(‘,’).Select(int.Parse).ToList();

Continue Reading ..
C#

Converting a List to a comma separated string in C#

- 03.01.21 - ErcanOPAK comment on Converting a List to a comma separated string in C#

List<int> list = new List<int>() {1,2,3}; string.Join<int>(“,”, list) Join has generic overloads. It is so much easier to use it in that way to convert your list to the different types.

Continue Reading ..
ASP.Net MVC / C#

How to add placeholder to Multiple Selection DropDownList in Asp.Net MVC

- 02.01.21 - ErcanOPAK comment on How to add placeholder to Multiple Selection DropDownList in Asp.Net MVC

@Html.ListBox( “Countries”, ViewBag.AllCountries as MultiSelectList, new { @class = “form-control”, data_placeholder = “Choose a Country…” } )

Continue Reading ..
JavaScript

How to use toFixed() for Float numbers in Javascript

- 21.11.20 | 15.01.21 - ErcanOPAK comment on How to use toFixed() for Float numbers in Javascript

The toFixed() method formats a number using fixed-point notation. function financial(x) { return Number.parseFloat(x).toFixed(2); } console.log(financial(123.456)); // expected output: “123.46” console.log(financial(0.004)); // expected output: “0.00” console.log(financial(‘1.23e+5’)); // expected output: “123000.00” OUTPUT: > “123.46” > “0.00” > “123000.00”

Continue Reading ..
ASP.Net MVC / C#

Convert List to List in one line in C#

- 08.10.20 - ErcanOPAK comment on Convert List to List in one line in C#

string sNumbers = “1,2,3,4,5”; var numbers = sNumbers.Split(‘,’).Select(Int32.Parse).ToList();

Continue Reading ..
Page 1 of 16
1 2 3 … 16 Next »

Posts navigation

Older posts
April 2021
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  
« Jan    

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (243)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (194)
  • How to make some specific word(s) Bold or Underline in ReportViewer (187)
  • How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components (183)
  • Confirm before process with ASPxButton in Devexpress (172)
  • ASPxGridView – Disable CheckBox based on condition in GridViewCommandColumn (170)
  • Find numbers with more than two decimal places in SQL (168)
  • Devexpress ASPxGridview Column Grouping in Code (164)
  • DATEADD Function in SQL (163)
  • Tense Changes When Using Reported Speech (160)

Recent Posts

  • How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL
  • How to auto-scroll or manually to end of div when data is added
  • Filter Rows By Max Date in SQL
  • How to Validate a DateTime in C#?
  • Convert comma separated string into a List in C#
  • Converting a List to a comma separated string in C#
  • How to add placeholder to Multiple Selection DropDownList in Asp.Net MVC
  • How to use toFixed() for Float numbers in Javascript
  • Convert List to List in one line in C#
  • How to use column search in datatable when responsive is false

Recent Posts

  • How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL
  • How to auto-scroll or manually to end of div when data is added
  • Filter Rows By Max Date in SQL
  • How to Validate a DateTime in C#?
  • Convert comma separated string into a List in C#

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (243)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (194)
  • How to make some specific word(s) Bold or Underline in ReportViewer (187)
  • How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components (183)
  • Confirm before process with ASPxButton in Devexpress (172)

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter

powered by XBlog Plus WordPress Theme