Skip to content

ErcanOPAK.com

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

Tag: class

C# / Visual Studio

How to make the default class type ‘public’ instead of ‘internal’ in Visual Studio

- 22.05.22 - ErcanOPAK comment on How to make the default class type ‘public’ instead of ‘internal’ in Visual Studio

VS2012: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class VS2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class VS2017(RC): C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class VS2017(Professional): C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class VS2019 (Enterprise): C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class\Class.cs VS2019 (Professional): C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class\Class.cs Starting with Visual Studio 2022 VS is a 64 bit application, meaning the item templates are in C:\Program Files\… instead of C:\Program Files […]

Continue Reading ..
JavaScript

Add and Remove classes from element in Javascript

- 23.10.21 - ErcanOPAK comment on Add and Remove classes from element in Javascript

classList is pretty smart and the most modern system of manipulating CSS class names in elements via JavaScript. Adding class name: const element = document.getElementById(‘txtMyText’); element.classList.add(‘myClass’); Removing class name: const element = document.getElementById(‘txtMyText’); element.classList.remove(‘myClass’); Removing multiple class names: const element = document.getElementById(‘txtMyText’); element.classList.remove(‘myClass1’, ‘myClass2’) Thanks to clubmate.fi

Continue Reading ..
ASP.Net MVC / Devexpress

How to apply a custom CSS class to Devexpress components

- 30.03.20 - ErcanOPAK comment on How to apply a custom CSS class to Devexpress components

For all the Devex Components, you can use ControlStyle > CssClass property to apply your custom CSS class (Example 1 and 2) or you can do it with parameter (if it is allowed – as in Example 3). Here is 3 examples for MVC: @Html.DevExpress().SpinEditFor(m => m.Books.Rating, settings => { settings.Properties.SpinButtons.ShowIncrementButtons = true; settings.Properties.Increment = […]

Continue Reading ..
C#

Constructors and Its Types in C#

- 25.03.20 | 29.03.20 - ErcanOPAK comment on Constructors and Its Types in C#

Constructor is a special method of the class that is automatically invoked when an instance of the class is created is called a constructor. The main use of constructors is to initialize the private fields of the class while creating an instance for the class. When you have not created a constructor in the class, the compiler […]

Continue Reading ..
C#

What does the word ‘new’ mean exactly in C#?

- 22.03.20 | 29.03.20 - ErcanOPAK comment on What does the word ‘new’ mean exactly in C#?

In C# (and many other languages) you will find that you use new often as it is fundamental to using types and classes. The new keyword does pretty much what it says: it will create a new instance of a class or type, assigning it a location in memory. Let me try and illustrate this. Company company; Here […]

Continue Reading ..
ASP.Net WebForms / C#

How to access session variable in App_Code class file?

- 05.12.19 | 22.12.19 - ErcanOPAK comment on How to access session variable in App_Code class file?

string MySessionValue = System.Web.HttpContext.Current.Session[“YourSessionVariable”].ToString();  

Continue Reading ..
ASP.Net MVC / C#

Using View Model to pass Multiple Models in Single View in MVC

- 22.06.19 | 22.11.19 - ErcanOPAK comment on Using View Model to pass Multiple Models in Single View in MVC

In MVC we cannot pass multiple models from a controller to the single view. There are a few solution for that problem. But in this article we will use View Model. Here is the solution:

Continue Reading ..
August 2022
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Jul    

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (364)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (237)
  • Find numbers with more than two decimal places in SQL (205)
  • Confirm before process with ASPxButton in Devexpress (202)
  • Add Constraint to SQL Table to ensure email contains @ (201)
  • ASPxGridView – Disable CheckBox based on condition in GridViewCommandColumn (199)
  • How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components (197)
  • How to make some specific word(s) Bold or Underline in ReportViewer (191)
  • Devexpress ASPxGridview Column Grouping in Code (184)
  • Tense Changes When Using Reported Speech (171)

Recent Posts

  • How to create the ShowBlanksValue and ShowNonBlanksValue items in Devex Grid
  • How to get ‘n’th row in Sql Query with OFFSET FETCH NEXT and ROW_NUMBER()
  • How to change the style of scrollbar with CSS
  • How to add scroll bar to div in Asp.Net
  • How to solve “Fatal: Not possible to fast-forward, aborting” problem
  • How to add Output Parameter to SqlDataSource
  • How to get stored procedure parameters details in SQL
  • How to add default value for Entity Framework migrations for DateTime and Bool
  • String Interpolation, String Format, String Concat and String Builder in C#
  • How to get triggers create and update date in SQL

Recent Posts

  • How to create the ShowBlanksValue and ShowNonBlanksValue items in Devex Grid
  • How to get ‘n’th row in Sql Query with OFFSET FETCH NEXT and ROW_NUMBER()
  • How to change the style of scrollbar with CSS
  • How to add scroll bar to div in Asp.Net
  • How to solve “Fatal: Not possible to fast-forward, aborting” problem

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (364)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (237)
  • Find numbers with more than two decimal places in SQL (205)
  • Confirm before process with ASPxButton in Devexpress (202)
  • Add Constraint to SQL Table to ensure email contains @ (201)

Social

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

© 2022 ErcanOPAK.com

Proudly powered by WordPress | Theme: Xblog Plus by wpthemespace.com