Skip to main content

Posts

Showing posts with the label HTML

How To Use HTML5 DataList Control

As a develop we are very familiar with the html controls. Now in html 5 many new controls has been added to the existing collection. HTML5 DataList is one of the type in the new collection. I am going to explain about what is datalist control and how to use datalist control in our projects.

Add remove select and set items in select drop down list

Introduction: In my previous article I have explained about Convert string to lowercase-uppercase in xslt . In this article I am going to explain about how to add,remove,check and set the items in select using jQuery Explanation: For example in my form I have a select option with id “ seloption ”. To add a item with value “option1” and with text “Option-1” below code is used.

How to convert the typing language to tamil using javascript

Introduction: In my previous article I have explained about  how to   How to Convert string to titlecase using javascript . In  this article I will explain the script used to change the typing language in a texbox using javascript. Explanation: For explanation purpose I have a textbox in my page.To convert the the typing language to tamil I have included two javascript files in the page. They are

Dynamically programmatically add title,description and keywords to page in C#.net

Introduction: In this article I am going to explain about the c# code used for adding  meta tags like title,  description and keywords to page . Explanation: While programming some times we suppose to add meta tags like title description and keywords dynamically. Since meta tags like keywords and description is very important for search engine optimization we supposed to add unique meta tags for each page.

Preselect html select/drop down value based on text in asp.net

Introduction: In this article I am going to explain about how to preselect asp drop down or html select value based on a text. Description: In some cases we are in the situation to preselect the drop down or html select option based on some text. Here I am explaining this process using javascript code. For the explanation purpose I have a form. In that form I have a html select with id “ select_cities ”. This select have three options and each option have some values. In this scenario I am supposed to select the option with the text “Kanna”. For this I have written a javascript function “test”.Below is the code used.

Disable cut copy paste operation on a textbox using asp.net/javascript

Introduction: In this article I am going to explain about how to disable cut , copy and paste operation on a textbox Description: Some time for some security purpose we need to restrict the user from cut,copy and paste operation on a textbox. We can achieve it using a simple code which is given below. For this we are using three client side events oncopy,onpaste,oncut. Code: < asp : TextBox ID ="txtTest" runat ="server" oncopy ="return false" onpaste ="return false"     oncut ="return false"> </ asp : TextBox > Thus the above code returns false on cut, copy and paste operation. Do you like this article. Then comment here or share with your friends. Or like our facebook page.

Find difference between two dates using javascript

Introduction; In this article I am going to explain about how we can findout the difference between two dates using javascript. Description: Many time we supposed to do some validations on client level to make the data valid. Like this here I an explaining about how we can finout difference between startdate and end date and how we can restrict the form submission based on that. For explaining purpose I am considering that the date entered both in startdate and enddate field will be in the “MM-DD-YYYY”.  And our condition is if the date difference between the two dates is greater than 7 then it will show the alert message. The necessary ASP.Net code and the javascript code is given below.

Refresh page periodically in C#.Net/ASP.Net

Introduction: In this article we are going to discuss about how to refresh the page periodically using c#.code or html meta tag. Description: Some time we face the situation like represhing the page periodiclly. In this article i am going to explain about refreshing the page periodically using html and C# code. In HTML to do this periodic refresh we are using the meta tag with the attribute  http-equiv="refresh".  Below is the HTML code for refreshing the page.