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

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

29 November 2011

Checkboxes in the GridView

Hi Friends,

Today i was thinking about some small JavaScript code regarding the check boxes checked status inside the GridView and then i did some R&D and implemented the code for the Select All/ Unselect All link buttons.
Hope this will be useful for us for our development environment.

Please follow the link below for the detailed description and the Code snippet which can be very useful while implementing the code.

http://www.dotnetspider.com/resources/43376-Smallest-JavaScript-Code.aspx


4 November 2011

Visual Studio Light Switch

Hai Friends,

This post will talk about the latest version of visual studio named as "Light Switch". 

This resource will describe about the new development tool which is the extension of Visual Studio 2011 with lot of features as inbuilt so that the developer only need to think about the application business logic rather than thinking about the whole application architecture and design.

The Light switch application contains many default functionality which are required for every business applications like 
  • Search capabilities: – the business application will have the search feature to search the contents inside the business applications.
  • Sort capabilities: - The business application will also have the sorting and rearranging capabilities in the grid where the data is displayed
  • Export: – this is also a generic requirement where the export feature is also built-in. Means all the business application created by using LightSwitch will have default export functionality of the data.
  • Addition to all the above features, the LightSwitch application will also have the default features to add, update, save and delete features. 
  • The data validation logic is also built-in in the LightSwitch business applications. It means the data which is inserted/updated or deleted can be controlled by using the validations. 
  • Extended features: - With the above all features, there are few extended features like appearance of the application, we can use custom controls. Also we can format the UI by writing the custom business types.
      See the details at the below link: 

19 September 2011

Layer Over LINQ

Hai Friends,

This post contains the details about a new data-access component on top of entity framework. So due to this reason, it can improve the performance of the application as well as the productivity of the developer to develop the application.

It has mainly 5 features:
  • Eliminate Linq to Entity Limitations
  • Powerful dynamics query operators.
  • Decouple from the data.
  • Reusable query fragments.
  • Automatic Linq query compilation.
These are the good features it has.

For the more details, you can visit the below link:
https://www.layeroverlinq.com/

15 September 2011

3-Tier Architecture

Hai Friends,

This is the post which will define the small demo regarding the 3-tier architecture where i have explained all the layers- Application layer, Business Logic Layer and Data Access Layer and their interaction to perform the architecture of tried.

See the below link:
http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=295547&

14 September 2011

Time in Dropdown list

Hai Friends,

As we know in ASP.Net, that there is no Built in control in which can display only the time (We have datetime picker in windows application where we can choose the enum value as time only to show the time).
So in this article we will take help of ASP.Net Dropdown list to show the time only to fulfill our requirements.
See the below link:

Date-Time functions

Hai Friends,

This article will describe all the date time functions which are introduced in the latest version of SQL Server (SQL Server 2008R2) including all the previous functions.
This post is useful to all those who work in Sql server database domain.

See the link below:
http://www.dotnetspider.com/resources/43248-Date-Time-Functions-SQL-Server-R.aspx
 


9 September 2011

N-Tier Architecture

Hai Friends,


This is the post which is showing the n-tier architecture using the GridView implementation.


Here i am showing mainly 4 layers -

1. Application layer/UI layer
2. Business Object layer
3. Business Logic Layer
4. Data Access layer


Here in this article I am showing how these layers interact with each other through code implementation.
It will be useful for all those who are new learner of the architectures.


See the link below:

http://www.dotnetspider.com/forum/294982-Hoe-write-gridview-control-using-thre-tier.aspx



31 August 2011

Shortcuts in .Net 2010

Hai Friends,

This is article which is very useful in day-to-day coding implementation for those who are in Microsoft .Net technology and using Visual studio for their development.
This article contains all the shortcuts which can be used while writing the code in .Net. It includes all the shortcuts which can really increase the utilization of the resource and can improve the performance.
Now you don’t need to remember all the syntax which is required to write the loops, properties, events, delegates, dependency properties etc.
So use this resource and improve the productivity.


See the link:
http://www.dotnetspider.com/resources/43223-Code-Shortcuts-Visual-Studio.aspx


26 March 2011

3 small things in C# code

1. Null Coalescing Operator (??)

A new operator can be used which can be shortcut of ternary operator to check the null value:

Ternary operator (?:):

string empName = (value != null) ? value : string.Empty;
we can write it using null-coalescing operator (??):
string empName = value ?? string.Empty;

2. The As Cast
we might have seen the code something like:
if (customer is DeluxCustomer)
{
var dCust = (DeluxCustomer)customer
// ...
}
This is redundant because we are checking the type twice. Once in the is check and once in the cast.
We can use as operator in place. This will cast the type if the types are compatible, or return null if not:
var dCust = customer as DeluxCustomer;
// ... we can write if condition to check for null
}
we can avoid double-checking the type.
3. Auto-Properties
This is the new concept to define the properties in C#: we can define the auto-property without much code:
public class Employee
{
public int ID { get; set; }
public string name { get; set; }
}

Sr .Net Consultant | MCP Certified | Microsoft Technologies(.Net with Sql Server, MVC, AngularJS

My photo
Kuala Lumpur, Kuala Lumpur, Malaysia
Overall 17.0+ years of experience in software industry as a Programmer/Developer/Architect with Web & Windows application development and Maintenance, including analysis, design, coding, testing and documentation. • Proficient in Microsoft Technologies i.e. Visual Studio with .Net Framework. • Excellent analytical, problem solving, communication, interpersonal skills with the ability to handle multiple tasks or projects working independently or in a team. • Consistent attention to detail with an ability to analyze and interpret the implication of decisions to minimize bugs and create user-friendly applications. • Experience of Collaborating with Clients and Team Members. Ability to convey Technical Information at all levels. • Ability to work with team/management to ensure successful execution of project management tasks including scheduling, scope management, outside dependency coordination and priorities resolution. • Experience in working with global clients like UK, USA, Europe, Australia etc. and teams located remotely (e.g. Sydney, Australia, USA, and Sweden). • Worked with the Swedish client ManpowerGroup at onsite client location Stockholm, Sweden.