CSS3 My Most Suggested Quick and Easy Tips

css3

Using CSS3 we can now design creative images, backgrounds, patterns, etc without the use of actual images. This article will cover how to:

  • Create a rounded element (element can be a divider, paragraph, textbox, label, etc)
  • Create a circle from an element
  • Drop shadow of an element
  • Create gradient color in an element
  • Drop text-shadow
  • Creating Columns
  • Background Gradient:
    • Linear
    • Radial
    • Repeated

Continue reading

Error: String was not recognized as a valid DateTime (SOLUTION)

DateTime

This happens mainly due to the fact that the actual accepted date format is not dd/MM/yyyy as we all prefer to use it, but instead it is MM/dd/yyyy. Therefore, all we need to do is convert it to such format by using ParseExact.

Below is the exact code you will need to solve issue, replace the DateAsString “25/09/2012” to your label, textbox or whatever your requirements.

Continue reading

Error: ExecuteScalar requires the command to have a transaction when the connection assigned to the command is in a pending local transaction.

Connection already open

Execute Scalar Error Reason:

The connection would already be open so when we try to open a connection in a method, the system gives out this error.

Execute Scalar Error Solution:

Easy, all you need is to add the following code to the method in order to check if the connection is already open:

Continue reading

REGEX validators

regular expression validator correct

I suggest that everyone should validate their input both client side and server side. Following example using Visual Studio 2008/2010 and Javascript for other, can come in very handy.

Read more to find samples of both Client Side and Server Side Validations along as some of the most used regular expression validators (money, email, phone) and their accepted values.

Continue reading

CSS link Style Tips

 

cascading style sheet

There are different styles to set on links in different environments:

When we want to set a whole page/divider/table to have a certain link style we use the below CSS:

.MyLink {font-family: arial; font-size: 16px;}

.MyLink a:link{color: black; text-decoration: none;}

.MyLink a:hover{color: black; text-decoration: underline;}

Meanwhile if we would like to add a style to a specific link such as:

<a href=”MyPage.html” class=”MyLink”> My Page </a>

Then the CSS would look like:

a.MyLink:link {color: black; text-decoration: none;}

a.MyLink:hover {color: black; text-decoration: underline; }