Release candidate for Visual Studio 2010 Released

Hi,

Today Microsoft has released Visual Studio 2010 (VS 2010) RC for MSDN Subscriber. It will be available for the General people on RC on 10th February.

If you are an MSDN subscriber you can go ahead and download the bits right now from the link below.

http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

The early feedback on Twitter seems very good already about the performance. Do check it out.

 

Continued...

Displaying Multi line wrapped text in web form

Hi,


Many a times there is requirements for us to display text in multi-line in web pages. The first try that most of the people do is by giving a fixed width to the label. But this never works.

Height and Width works only for block level element. Label is an inline element and hence setting width does not work.

 

What you can instead do is use a textbox with CSS that will make it looks like a label. To do this we need to set the following properties.

Continued...

Comparing different type with Double Equal operator and Equal method

Hi,

 

There are normally two ways to compare 2 objects. One by using == operator and by using the equals method. But these two are not same in the way they implements the comparison.

 

The difference is there in the type of object (reference type or value type)

 

Value Type

Continued...

Using Observer design pattern to notify multiple class on change

Hi,


Many times when programming we come across situation where by change in one change needs to be updated in multiple object. For example if a parameter is used to make multiple calculation in different objects then on change of that parameter all the objects need to be notified of the change.  Or for example when the windows (operating system) or Dot Net framework shut downs or closes then it notifies all the application running on it to close so that it can make a clean close.

 

Continued...

Received the Microsoft Most Valuable Professional award for the year 2010

Hi,

 

I feel great joy to share with all that I have been rewarded the Microsoft MVP award for the year 2010 also. It feels great to have received the Award 2 year in succession.

 

A very Big Thanks to the MVP Team, My MVP lead and the Microsoft for giving the MVP award to me.

Thanks to all the friends, developers, and community members that have worked with me. I will try and continue my work forward in 2010......

Vikram


Microsoft has announced the launch of Visual Studio 2010 Beta 2 with a Go Live License and tons of improvement

Hi,

Microsoft has announced the release of the Beta 2 of the Visual Studio 2010. MSDN Subscribers can download the same today and this will be available for the general Public of Wednesday. The link for download is

http://msdn.microsoft.com/hi-in/vstudio/dd582936(en-us).aspx

VS 2010 and .NET 4 bring a huge number of improvements and additions. They include big advances for ASP.NET web development, WPF and Windows Forms client development, SharePoint development, Silverlight development, data development, parallel computing development, and cloud computing development. VS 2010 also delivers a ton of improvements in the core IDE, code editors, programming languages, and enterprise design, architect, and testing tools. 

Continued...

Join the full day free community techdays event on 11th October 2009 in Kolkata

Hi,

Although a little late in blogging this, But I would like to invite all people in and around kolkata to join the KolkataNET - KolkataITPro - Community Tech Day on 11th Oct. 2009. The event is being held at International School of Business & Media, Kolkata Campus situated at Kolkata (address below). The event does not require any registeration free and is free.

The agenda for the event are below.

Continued...

An easy way to install application for web development Web Platform Installer 2.0

Hi,

Of late Microsoft Has been doing great job in creating an great experience for installation for both development component for Asp.net and IIS server and also available free open source software. Yes I am talking about the Web Platform Installer 2.0.

The web Platform Installer has been a great success, and is very user friendly tool to install most of the available software required for web development along with many available open source platforms and application.

Web Platform Installer 2.0 (Also known as Web PI) was released recently and can be downloaded from the link below.

http://www.microsoft.com/web/downloads/platform.aspx

Continued...

Having clause and Grouping Based on condition in LINQ

Hi,

While querying with LINQ, some times we will have to use the group By clause. But many a times we also want to use the having clause of SQL with the group by clause in the LINQ. There is no direct having keyword in LINQ to do this we need to use the where clause itself.

You can query the LINQ to SQL to have both Group By and Having like this.

Continued...

LINQ queries and IN clause in SQL

Hi,

When working with the LINQ queries for SQL one of the common queries that we need to run is the select query with IN clause. In SQL IN clause is used to provide more than one value to match in the where clause.

Something like the query below

Select * from Table
where column1 in (‘Value1’, ‘Value2’, ‘Value3’)

To do a similar query in LINQ we can use

var list = from t in table
                where t.column1 = Value1’
                And t.column1 = Value2’
                t.column1 = Value3’
                Select t

Continued...

A workshop for IT Professionals on 15th September on Implementing SECURITY INSIDE-OUT with MICROSOFT Technologies
Hi,

There an interactive live session on September 15, 2009 on how the New Efficiency Products will help you manage security in a simpler way. This session will occur across 16 cities at NIIT centers as a live session with benefit of face-to-face teaching, each participant having their own computers to work on, and having the ability to ask questions any time. The following event is available for the following city.

Ahmedabad       
Lucknow
Bangalore          
Mumbai
Bhopal 
Mysore
Bhubhaneswar  
Nagpur
Chandigarh        
Nasik
Chennai              
New

Continued...

How to know when the application is running in Localhost or debugging mode

Hi,

Most of the time (If not all) when working on the project we view the website with the help of localhost in debugging mode. Many a times when working on some modules, for solving small problem, we want to write some code that should execute only when running in the localhost or debugging environment.

Normally developers would write the code and then take it as their responsibility to remove the code before the code goes to the next environment. But some time we might make a mistake of not removing the code and letting it go to the next environment, which can cause a lots of trouble.

In these kinds of circumstances and Asp.Net developer can take help of the IsLocal method of the Request class. The method will return true in case the application is running from localhost.

Continued...

How to change the default profile setting in Visual Studio

Hi,

While working with Visual Studio, was that normally we have to select the profile setting (Visula Basic profile, C# profile, web development profile etc...) when we start the Visual Studio for the first Times. But Many a time after working on a type of project for some time you start working on other types of project.

For Example, Currently I am working on a Windows Applictaion (With Language VB.Net) But before this project I was Working on Web Development in C#, and before that Windows Development in C#.

In Visual studio you can easily change the profile of the IDE by going to Tools -> Import Export Settings. This brings up Import Export Windows Wizard. Follow the simple Wizard (which also allows to save you the current settings  for future use) and seletc the new profile setting (based on the kind of project you are working on) and you are ready to work with new profile.

Vikram

Continued...

Create PDF, Excel or Word File from Crystal Report from Code

Hi,

Some times when working with crystal report viewer you do not want to show the report to user in raw format but instead you want to pass on the report in PDF or other format without requiring user to do extra click. This can be done easily in Dot Net with the following code.

MyReport report = new MyReport();

DataSet ds = GetData();

report.SetDataSource(ds);

report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "ExportedReport");

 

Continued...

ASIA MVP Certification Hero Award 2009

Hi,

Just received the ASIA MVP Certification Hero Award 2009. I did not knew that another award was coming. Was more than pleasantly surprised. Thanks to Microsoft, Microsoft MVP Team, Microsoft Learning Team.

Its amazing that You get awarded for Helping others with the knowledge of discounts available.

Again Thanks to Microsoft for the award.

Vikram


FormView Control will not render any HTML of its own in Asp.net 4.0 if RenderTable property is set to false

Hi,

another of the new features of Asp.net 4.0 is the enhancement(in terms of rendering) made in the Formview control. By default the Formview control would render table, tr and td tags for display of content. This can be of much trouble to many of the designer because they have little control over the rendered HTML.

With Asp.net 4.0 you can disable the rendering of these HTML elements. (Mind you in Asp.Net 4.0 by default these HTML content are rendered.) To do this all you need to do is set the RenderTable property to False.

<asp:FormView ID="FormView1" runat="server" RenderTable="false">


This enhancement can make it easier to style the content of the control with CSS, because no unexpected tags are rendered by the control.

Vikram

Asp.net 4.0 set the page metadata programmatically with the help of Page level properties

Hi,

One of the small but new features in Asp.Net 4.0 is the addition of the Title, Metakeyword and Metadescription property in the page class itself. Now we can easily set the Title, Metakeyword and Metadescription (very important for sites looking for SEO.) from the page itself.

Continued...

Virtual Techdays from August 19 to august 21 free
Hi,

You can attend Virtual Techdays live using the live meeting. All the session are free and will be available using Live meeting. All session will be held between Aug 19-21.

I would encourage everyone to take the maximum benefit of this opportunity. . This edition of the event will have 13 technology tracks dedicated to developers, infrastructure professionals, architects and designers. You can register for the virtual Techdays from the following Continued...

Windows 7, Windows Server 2008 R2 and Exchange server launch road show in India in 16 different cities

Hi,

Microsoft is organizing a road show for the launch of Windows 7, Windows Server 2008 R2 and Exchange Server 2010. Roadshow will be organized in 16 cities in India on different Dates.

Please find the below list of Cities and Dates for the event. You can find more at the following link. All the events will be held from 2 pm to 6 pm

http://impactmarketingservice.com/promotions/2010/q1/win7/tech/login.asp

Continued...

Default printer setting using dot net
Hi,

There came a requirement in one of my colleague’s project whereby it was needed to set the printer to be used for the lotus notes (The project is about integrating with Lotus Notes.).  

To solve the issue instead of looking into the Lotus notes API I thought it should be much easy to set the default printer for the machine. Once the Default printer is set Lotus notes will use this printer to print any document.  Below is the code needed to set the default printer of any machine.

[DllImport("winspool.drv", SetLastError = true)]
private static extern void

Continued...

Dot net Windows Application Adding Multiple FontStyle to a single font class object

Hi,

While working with Textbox in a windows application I wanted to show the text of the textbox to be both Bold and Underlined. I had to do this based on certain condition.

I was surprised to see that the bold and underlined properties in the font class are readonly. What this means is that we can only set these properties in the constructor of the class and there is no other way to set the property.

Continued...

Path.combine to combine two paths and backslash in second parameter

Hi,

system.IO.Path comes with many good function to work with the File system. some of them are ChangeExtension, GetDirectoryName, GetExtension, GetFileNameWithoutExtension, IsPathRooted etc.

The system.IO.Path.Combine is also include as a function in system.IO.Path to combine two paths provided to it. A few days back I was working with it to add paths provided by user. But I started getting erros where by sometimes the path would not be combined and only the second provided path was returned. After doing some research on this I got to the root of the cause.

The problem was only occuring when the second path provided in the method was starting with "\".

To make my understanding more accurate I made a small console applictaion to show what would be the result in differenct scenarios. Below are the situation and the output I got for them.

Continued...

Improvements made in Base class libraries in Dot net framework 4.0

Hi,

Continued...

Visual studio 2010 to have Historical debugger

Hi,

In The visual Studio 2010 team System, A new feature called Historical debugger. Normally, when we want to debug an application we always put the breakpoint first and then start the Application or attach some process for debugging. Visual studio 2010 team system is coming with a feature called historical Debugging which allows code execution to be rewound in case the breakpoint was not already present when the error occurred.

Unlike the debugger of Visual Studio 2008 o before which only record the currently active stack, the historical debugger will record all the event like prior function calls, Method parameter etc(whatever required for debugger) even though there is no breakpoint. This allows the code to be rewound whenever an error occurs.

One drawback of Historical debugger would be that it will take a lot more time and memory as the historical debugger will be recording all events even if no breakpoint are set.
 
Vikram


Compressing Session State for out Of Process session in Asp.Net 4.0

Hi,

 

Most of us who creates Web sites work with session. We use sessions to store user specific data, so that it can be retrieved very easily.

 

You can read my earlier posts on sessions here.

 

A few interesting things about session in Asp.Net

Continued...

Permanent Redirect in Asp.net 4.0

 

Hi,

 

Continued...

Going to Teched Conference in Hyderabad

Hi

 

After a lot of change in decision due to various reason, yesterday I Got the confirmation (and confirmed) my seat at the Teched conference being held in Hyderabad from 13th to 15th May. The conference should be a great to watch, but most important for me would be the keynote by Steve Ballmer.

 

I am going with lo6ts of expectations, and I am very sure most of them will be full filed. I am also very hopeful to meet many of the folks with whom I have had communication through Phone, Email, chat etc...Only.

Continued...

Asus Netbook Received from Microsoft for Windows 7 Bug reporting

Hi,

Yesterday I received the Asus Eee Series Netbook from Microsoft for my works and bug found in Windows 7 Beta testing. I must say its an amazing feeling to have your first netbook in your hand.

The netbook received is Eee PC Windows XP edition 900 Series.

Till now I am working on finding out how the netbook can be connected to the my desktop so that I can do more with netbook, Install some necessary software (Required for internet connection) etc. If some has some idea do share with me....

But Its a great pleasure to have you own portable netbook.I cannot express My happiness more.....

Vikram


Search on Last Modified By field in Sharepoint not working by default

Hi,

 

Of late I have been working in Sharepoint project which works extensively on searching of data. We have implemented our own custom search page and use Sharepoint object model for searching the data.

 

Yesterday I found a unique bug in Sharepoint. While search for data based on different specific columns (mapped in Metadata property mapping), the search never fetched result when I made a search on the Last modified by field. I had updated all of the documents multiple times and also crawled the records properly after updating the data. But this did not solved the problem.

 

Continued...

Blogs updates notification on twitter

Hi

 

After announcing the updates of the blog as SMS Alert (Only in INDIA with the help of Google SMS channel), I saw a good number of people using the service.  If you are India and want to get my blogs (Title only) as an SMS whenever new content is posted, you can also subscribe to the service.

 

Continued...
 
Copyright © 2006 - 2010 Vikram Lakhotia