- Go ahead and find the default template from the following location- [Visual Studio Installation Directory]\Common7\IDE\ItemTemplates\CSharp\Web\MVC 3
- Copy the "CodeTemplates" folder.
- Paste the "CodeTemplates" folder to the project's root.
- Remove the templates(extension '*.tt') that you do not need to customize from the project's "CodeTemplates" folder.
- Select the templates(press and hold ctrl and click on the template) and go to properties(right click and select properties).
- Clear "Custom Tool" entry. By doing this, it will not run the template automatically every time you build the project.
- Now customize the template as you want and build the project.
- Right click on View folder and select add view. From the add view popup dialog box, select the model class and you will find the customized template in the "scaffold template" drop down list.
Thursday, May 10, 2012
Customizing ASP.Net MVC Template
Saturday, April 2, 2011
Top Ten Errors Java Programmers Make
According to the author, Below are the top ten mistakes that java programmer do while they do coding. So look at them and stop doing the same error again and again :)
10. Accessing non-static member variables from static methods (such as main)
9. Mistyping the name of a method when overriding
8. Comparison assignment ( = rather than == )
7. Comparing two objects ( == instead of .equals)
6. Confusion over passing by value, and passing by reference
5. Writing blank exception handlers
4. Forgetting that Java is zero-indexed
3. Preventing concurrent access to shared variables by threads
2. Capitalization errors
1. Null pointers!
For details, please visit the original article.
Happy programming!
Thursday, March 3, 2011
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Error: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Cause: If you use either Response.Redirect or Server.Transfer method, you may face this problem. I was calling Response.Redirect method inside the Try...Catch block. This happens because both methods call Response.End internally.
Solution: Pass "false" to endResponse parameter of Response.Redirect method
Response.Redirect ("xyz.aspx", false);
Thats it. Simple.
Happy programming!
Monday, October 26, 2009
Celebrate the Release of Windows 7 at IDB Auditorium, Dhaka
Who can come: Anyone who uses a computer @ home/work.
Entry Fee:
Updated- No entry fee needed (Seats Limited).
Date: Saturday, November 7, 2009
Time: 10:30am - 1:00pm
Location:
IDB Auditorium, IDB Bhaban
E/8-A Rokeya Sarani, Sher-E-Bangla Nagar
Dhaka, Bangladesh
To register visit: http://bd.merawindows.com
Windows 7 community members will be able to install evaluation copy of Windows 7 on the event. Guest are encouraged to come with their laptop.
Proposed Agenda:
Introduction to Windows 7 (Presentation)
Demonstrate Live Windows 7 (Live Demo)
Introduction to IE 8 (Presentation and Live)
Demonstrate Windows Live (Presentation)
Windows 7 installation on interested audience's laptop
Small Quiz and distribute small gifts to the participants/winners
Note: Seats are limited so register and confirm your participation. Do hurry!
Hope everybody will enjoy the party.
Sunday, October 25, 2009
I am going to Mars!!! Do you want to go?

Ha Ha Ha. This is very interesting. I am going to mars!!! Oops... Not me but my name. LOL. I have found in Nasa's website that they are asking name from people and the name will be included with others on a microchip on the Mars Science Laboratory rover heading to Mars in 2011! I’ve entered my information at Nasa's website and received a certificate of participation which you are seeing in the picture here. It can be viewable from their website here too. So I am going... Oops my name is going at least :). Do you want to go with me? then register your name in their website.
Hope we will enjoy the journey :D
Thursday, June 11, 2009
Why microsoft sharepoint is so popular and is going to be more popular in future?
Recently I have started working on sharepoint server 2007. There are many reasons to love this application. I wanted to share some of our findings regarding sharepoint. Hope it will help you to take the right decision.
Top Ten Reasons Behind the Popularity of Sharepoint
There are many reasons behind the popularity of Microsoft sharepoint server. All the details can be found in sharepoint official site . Also I have found some important discussion here too. However, according to my point of view, following are main 10 reasons behind the popularity of sharepoint server:
1. Very easy to use as collaboration platform as it needs browser to access the server
2. Instantly create sites from predefined template
3. Share documents and tracking them with role based security
4. Use as a easy project management tool( manage lists, todo, share files, etc)
5. Plug and play webparts
6. Integrate with microsoft most popular product microsoft office
7. Work from internet as well as intranet
8. Integrated task calendar with microsoft outlook. so accessible from outlook directly
9. Connect developer, manager and client in one platform
10. Document versioning and sharepoint designer support to open and edit sharepoint site
isn't it enough to be popular sharepoint :)
Sharepoint Installation
Sharepoint installation is very easy and straight forward. If anybody is interested then can follow the procedure below:
1. First of all download the WSS 3.0 from the following location- its good for beginner or you can buy MOOS2007(Microsoft Office Sharepoint Server 2007)
http://www.microsoft.com/downloads/details.aspx?FamilyId=D51730B5-48FC-4CA2-B454-8DC2CAF93951&displaylang=en
Maintain the following sequence in a windows 2003 server. If you don't have windows server 2003, you can try with virtual pc or vmware what I am doing now
2. Install IIS
3. Install .net framework 2.0/+
4. Configure server
5. Install WSS
At the final step of installation you will get the link of the server to access. Wish you will enjoy your time with sharepoint.
Happy programming!
Thursday, January 22, 2009
Make Understand IE6 About 'position:fixed'
Many times we need to use fixed position along with relative, static and absolute position in style sheet, specially in AJAX progress bar. Now question is what it does actually? To show the longer content of a web page, browser use scroll bar which can make your progress message out of the sight. Specially, while we update at the bottom of the ajax update panel, user might not notify about the waiting message or update message. We can easily fix the problem by using 'position: fixed' in CSS. But problem is IE6 or older version of IE, don't understand this. To make it understand on this particular style, we need to write a little javascript code in the CSS. Let see that simple code below:
.updateProgress
{
background-color:#CF4342;
color:White;
position: absolute;
top: expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px');
right: expression(0+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px');}
}
Now for cross browser support let see the full code below:
<style type="text/css">
.updateProgress
{
background-color: #CF4342;
color: White;
top: 0px;
right: 0px;
position: fixed;
}
.updateProgress img
{
vertical-align: middle;
margin: 2px;
}
</style>
<!--[if gte IE 5.5]>
<![if lt IE 7]>
<style type="text/css">
.updateProgress
{
background-color:#CF4342;
color:White;
position: absolute;
top: expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px');
right: expression(0+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px');}
}
.updateProgress img {
vertical-align:middle;
margin:2px;
}
</style>
<![endif]>
<![endif]-->
That’s all. Enjoy Programming!