Skip to content

ErcanOPAK.com

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

Tag: mvc

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

How to render HTML tags Asp.Net MVC

- 25.08.20 - ErcanOPAK comment on How to render HTML tags Asp.Net MVC

string myValue = “<b>Hello</b>”; @Html.Raw(HttpUtility.HtmlDecode(myValue))

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 ..
ASP.Net MVC

Default Settings for Datatable in MVC

- 21.06.20 - ErcanOPAK comment on Default Settings for Datatable in MVC

When working with DataTables over multiple pages it is often useful to set the initialisation defaults to common values (for example you might want to set dom to a common value so all tables get the same layout). This can be done using the $.fn.dataTable.defaults object. This object will take all of the same parameters as the DataTables initialisation […]

Continue Reading ..
ASP.Net MVC

How to assing Selected Value to DropDownList in Asp.Net MVC

- 01.04.20 - ErcanOPAK comment on How to assing Selected Value to DropDownList in Asp.Net MVC

IEnumarable SelectList’s 4th parameter is just for that: @Html.DropDownList(“AuthorID”, new SelectList(Model.Authors, “Id”, “AuthorFullName”, Model.Books.AuthorId), “—Select an Author—“, new { @class = “form-control” })  

Continue Reading ..
ASP.Net MVC

How to use Html.TextBox for Date in Asp.Net MVC

- 01.04.20 - ErcanOPAK comment on How to use Html.TextBox for Date in Asp.Net MVC

@Html.TextBox(“BookName”, Model.Books.BookName, new { @class = “form-control”, @type = “date” })

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

Formatting a Nullable DateTime with ToString() in ASP.Net MVC

- 31.03.20 | 31.03.20 - ErcanOPAK comment on Formatting a Nullable DateTime with ToString() in ASP.Net MVC

Let’s say we have a Nullable DateTime named StartTime [DisplayFormat(DataFormatString = “{0:dd.MM.yyyy}”)] public Nullable<System.DateTime> StartTime { get; set; }

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 ..
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