If you have an ASP.NET page (.aspx) opened with the JavaScript showModalDialog() function and inside that page there is a form doing PostBack, when the PostBack is being done the page loads in another (popup) window. The easiest way to prevent this is to add the following tag inside the <HEAD></HEAD> tags of the ASP.NET page: <base target=”_self”>
How to check if a number is odd or even?
Advertisement More C# Resources The best way to see if a given number is odd or even is to use the modulus operator (%). The modulus operator returns the remainder when dividing two numbers. So if you do a modulus of 6 % 2 you get 0 because 6 divided by 2 doesn’t have a […]
How to validate a phone number in JavaScript
You can easily validate a TextBox against a phone number format, in JavaScript, using Regular Expressions (RegEx): <script type=“text/javascript”> function FormValidate(){ if(document.Form1.PhoneNumber.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1) { alert(“The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.”); return false; } } </script> And the HTML markup that works with this script, is: <form […]
Getting Started With Visual Basic 6.0
Comprehensive tutorial aimed at introducing you to the basics of programming in Visual Basic 6.0.
Using the printf() function
A guide to the famous printf() function in C. Shows you how to output data in several ways. The tutorial is not yet complete but will be continued soon.
Introduction to Object Oriented Programming
For those wishing to delve into the world of OOP using C++. You should have a little bit of programming experience to get the most from this tutorial.
Dealing with errors and tracing in ASP.NET
In this article we discuss dealing with errors. We’ll work with debugging issues, tracing, and custom error generation.
Programming a Paint Brush in Java
This program will help you enhance your mouse event concepts in Java. As the title indicates you will be playing with a brush after you go through the tutorial.
Basics of the DataList control
In this article, we’re going to study the DataList control which is one of the most often used controls provided by ASP.NET.
Foul language filter in PHP
You will learn how to create a simple PHP foul language filter function which uses a file containing foul words to replace them in the string of your choice with asterisks.