Translate to your language...

1 February 2013

MVC 3: MVC (Model View Controller) with Razor Engine

Hai Friends,
Now a days most of companies are asking the latest technology guys specially in Microsoft Technologies as Microsoft Corporation is releasing many technologies day over day. In all those MVC (Model View Controller) is one of them which is very hot in the markets now a days.
So all the Microsoft Techies are looking forward to get in to this new technology as it helps them to get new job, to improve there technical skills and be updated with the current industry standards and requirements.
This is the small initiation in this regards in form of a technical posts. 
This article will  describe about the MVC with Razor Engine
 (MVC 3), about how to create the Controller classes, 
Model classes and generate the Views automatically through the Razor Engine.
 The article is written with all the steps used to create the MVC3 application 
with ASP.Net.
Hope this article will be useful for those who are looking forward to create 
the applications in MVC3 (MVC with Razor) pattern. 
Please go through the below link to get the details about creating the 
MVC3 application in ASP.Net:

http://www.dotnetspider.com/resources/44324-MVC3-MODEL-VIEW-CONTROLLER-A-NEW-MVC-FRAMEWORK-WITH-RAZOR-ENGINE-BY-MICROSOFT.aspx  

5 January 2013

Update Config file settings Automatically using Windows Application

Hi Friends,
Sometimes we need to search for the application or the code snippet which
will work as per our requirements- Like update the configuration file 
automatically. Because this is the tedious task to update the config file
 manually and we want there should be a simple application where I can 
enter the server name, database name, user id and password and click on 
update should update our configuration file automatically.
So now nothing to worry and this article is all about that. This article will 
describe mainly about the updation of Configuration file 
(App.Config or Web.Config) settings by using the Windows Application. 
This windows application will take the inputs from the user like Database
 server name, user name, password etc and will update the configuration 
file settings automatically without opening the config file.
This article will describe each and every steps of creating the windows 
application and then code snippet so that we can use as is or can also 
modify as per our requirements.
For the details of the Windows application creation and the code snippet, 
you can follow my article:

http://www.dotnetspider.com/resources/44327-Windows-Application-Update-Configuration-File-Settings.aspx 

3 January 2013

Convert Numbers to Spellings- A C# Windows Application

Hai Friends,
This article is the small windows application developed in C# to convert the numbers to spellings. This article also explains about each and every steps to create the application with source code and creating the setup so that it can be run on any machine just by copying and pasting of the setup file. The end user can enter any number in the given textbox and click on the Convert to Spelling button. The converted spellings will be displayed in the label. The Program is written in such a way that it can handle the negative numbers also.The validation part is also included in the program so that it will allow the user to accept only the numbers.
You can go through the below link for the detailed explanation of the application including the setup
file:
Convert Numbers to Spellings- C# Windows Application 

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.