Translate to your language...

8 April 2012

18 most common validation scripts to validate the Controls in ASP.Net

Hai Friends,
Many times, we search in the Google to get the correct validations expression to validate our textboxes. And its true that we get various links where others have given their own validations expressions and controls using some scripts, regular expressions etc.
Then we implement those expressions and at the end, we found that it’s not working and again we start our search for the next link. It becomes very complicated whenever we have to fix the validation issue in a very small time and then we didn’t get the correct expression.
So dear folks, now nothing to worry as I have created a CommonScript.js file which contains the validation expression and they all are tested and in my project.
Like you, I also did the same and finally got this file which contains all the general use validation expressions to validate our controls. This CommonScript.js file can be modified as per your requirements like changing the message, modifying the scripts etc.
You can go through the below link for the detailed description:

24 March 2012

How to write the connection string and place it on to web.config file

Hai Friends,
Today I was thinking that many times, we are having doubt in writing the connection string in the web.config file. Whether the connection string is correct or not? Is it case sensitive? Is the User Id or userid is correct? Can we write pwd in place of password or Password?
As we can't check it in compile time, so all the error we get at the run time and then we try to replace the attributes of confile file by making the cap-locks to small or vice versa.
So I though to write an article which will be useful for we all who are working in Microsoft Technologies with the database.
As it will help to create all type of connection strings for their respective providers, so we need not to worry that it is applicable only to SQL Server.
You can go through the below link for the details with the screenshots where i have explained that how you can create and test your connection string before putting in the configuration file.
Hope it will help to all the members...

18 March 2012

Creating Code Snippet with the Shortcut in Visual Studio 2010

Hai friends,
Today i was thinking that lot many times we gets fed-up with writing lot of duplicate code so can't we create such type of shortcut so that no need to write the whole code and we can do it with a small shortcut. Then I created a Code snippet for the header of the files which will write the below stuff for me by just writing a small shortcut FHC and there are few place holders which we need to write it and its done:
//                       CTSInvoiceBO.cs
//       This file is the code for Business Objects of CTS invoice.
//               Modification Control Log
// Date           By  Version  Description
// 03/18/2012  PA  1.0       Business Objects of CTS invoice
Then i created a snippet file and added to my visual studio IDE and now i don't need to write all this code manually. There are few place holders which we need to update and rest all code and other format will be done automatically.
Guys you can follow the below link where you can get the detailed description of how we can create this Code snippet and how can we attach it with our Visual Studio IDE and also how to create the shortcut's for it.

Hope it will be helpful for most of the programmer who work in the maintenance projects where they need to define such kind of header for the file..