Skip to content

ErcanOPAK.com

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

Tag: asp

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 ..
ASP.Net MVC / ASP.Net WebForms / C#

Checking multiple contains on one string

- 30.08.20 - ErcanOPAK comment on Checking multiple contains on one string

new[] {“,”, “/”}.Any(input.Contains) or you can use Regex Regex.IsMatch(input, @”[,/]”);

Continue Reading ..
ASP.Net MVC / ASP.Net WebForms / JavaScript

How to refresh a DIV content with Javascript

- 23.07.20 - ErcanOPAK comment on How to refresh a DIV content with Javascript

To reload a section of the page, you could use jquerys load with the current url and specify the fragment you need, which would be the same element that load is called on, in our below case #myDivId function updateDivContent() { $(“#myDivId”).load(window.location.href + ” #myDivId” ); }

Continue Reading ..
ASP.Net MVC / ASP.Net WebForms / C#

Creating Multiline textbox using Html.Helper function in Asp.Net MVC

- 23.07.20 | 23.07.20 - ErcanOPAK comment on Creating Multiline textbox using Html.Helper function in Asp.Net MVC

@Html.TextArea(“Body”, null, new { cols = “55”, rows = “10” }) or

Continue Reading ..
C#

How to split string and get first (or n-th) value only

- 20.07.20 - ErcanOPAK comment on How to split string and get first (or n-th) value only

string myValueToSplit = “Istanbul, Tokyo, Seoul, Bangkok, Bali, Minsk, Belgrade, Kiev”; var theFirstValue = myValueToSplit.Split(‘,’)[0]; //OUTPUT: theFirstValue = “Istanbul” //You can change [0] as you wish. //For example, if you want to get Kiev, make it [7]

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 ..
ASP.Net MVC / ASP.Net WebForms / C#

How to use Stopwatch in C#

- 22.12.19 - ErcanOPAK comment on How to use Stopwatch in C#

The Stopwatch object is often used to measure how long things take. One quick thing to remember here is that it will take the time for everything you do between starting and stopping it, so make sure you only put the actual code you want to time between those.

Continue Reading ..
ASP.Net WebForms / HTML / PHP

Navigate to a Div using a button in HTML

- 26.05.19 | 22.11.19 - ErcanOPAK comment on Navigate to a Div using a button in HTML

The Div: <div id=”DivToNavigate”> The content goes here… </div>

Continue Reading ..
ASP.Net WebForms / C#

Display HTPP Headers in C# & ASP.net

- 10.06.18 - ErcanOPAK comment on Display HTPP Headers in C# & ASP.net

using System; using System.Web.UI; using System.Collections.Specialized; public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { NameValueCollection headers = base.Request.Headers; for (int i = 0; i < headers.Count; i++) { string key = headers.GetKey(i); string value = headers.Get(i); base.Response.Write(key + ” = ” + value + “<br/>”); } } }

Continue Reading ..
Page 1 of 2
1 2 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