Feb 25, 2011

Tech.Ed 2011 announcements I am looking forward to

TechEd is an event every developer, especially those working on Microsoft Technologies would look for. This year TechEd is on 23rd to 25th March at Banglore. With so many new products from Microsoft since last TechEd, I am looking forward for really cool stuff this year.

I expect sessions on hot cake technologies like Windows Phone, Azure. Introduction of these technologies have also resulted new architectural patterns. It would be nice to get introduced to these patterns. I expect a Azure trial period offer announcement for developers in India, as in US.

Some hands on and tips for Windows 7, Office 2010. Microsoft Certifications have been restructured in recent past. Several new certification focussing on new technologies have been added. It will be nice to have overview of that. I expect certification offers for recently introduced technologies.

A lot has been said on HTML5 and Silverlight. It will be great to hear about Silverlight focus from Microsoft guys. Silverlight team gives newer releases at rapid speed. You may expect something from this front.
Many features of Visual Studio 2010 are still undiscovered. A hands on lab on Visual Studio 2010 would be great. A lot of work has been done on deployment and hosting part. There are various new tool and options are available now. There should be a session on that with details of IIS 7.5.

SharePoint 2010 is a dramatic improvement from SharePoint 2007. I expect session on better integrations of Visual Studio 2010 and SharePoint 2010. A session on new UI model of SharePoint 2010 will also be helpful explaining plumbing behind tighter Silverlight integration and user friendly UI. I have only heard good things about ASP.NET MVC. I expect to see some stuff related to getting started on ASP.NET MVC3.

Nov 17, 2010

Incorrect syntax near '.'
Recently I came across an issue in Sql Server 2005, while running CROSS APPLY. The error says that Incorrect syntax near '.'. I tried to figure out all syntax that I could apply but it did not resolve the issue. Actually we need to set sp_dbcmptlevel level to 90. There are good blog posts for this here and here, which can save your valuable time.

Feb 3, 2010

Cross Apply Incorrect syntax near '.'

Recently I came across an issue in Sql Server 2005, while running CROSS APPLY. The error says that Incorrect syntax near '.'. I tried to figure out all syntax that I could apply but it did not resolve the issue. Actually we need to set sp_dbcmptlevel level to 90. There are good blog posts for this here and here, which can save your valuable time.

Dec 18, 2009

Asp.Net Save File on client machine

Recently I had a task to save file on client machine. We usually save file on server and in ASP.NET the more familiar task to save on client side was to export gridview results to excel file. This time the task was to save an image on client machine. Following is the code that I followed.

 

<pre name="code" class="html">

byte[] fileBytes = File.ReadAllBytes("D:\\Projects\\TestClientDownload\\images\\banner_ad_1.jpg");

       Response.ClearContent();
       Response.ClearHeaders();
       Response.ContentType = "text/plain";
       Response.AppendHeader("content-disposition", "attachment; filename=" + "banner_ad_1.jpg");
       Response.AppendHeader("content-length", fileBytes.Length.ToString());
       Response.BinaryWrite(fileBytes);
       Response.Flush();
       Response.End();

</pre>

Sep 4, 2009

Alert : can not set credentials for principal sa

 

While editing credentials of database user, you may get this error in Sql Server 2008 management studio. It is just a checkbox that needs to be checked to resolve this issue. But this may save your few minutes finding the issue cause. Here is a great link for resolving this issue –

http://weblogs.asp.net/atlaszhu/archive/2009/08/08/alert-cannot-set-a-credential-for-principal-sa-when-trying-to-modify-sa-properties-through-sql-management-studio-2008.aspx

Technorati Tags: ,

Aug 28, 2009

Apply CSS Class based on Browser

 

Do you need to modify couple of CSS class attributes depending on browser?  There are various ways to achieve it. But I found this very simple approach for working on this issue.

                There are modifications needed at 2 places in the code. One is in the HTML body / ASPX page and other is in CSS file. Suppose there is DIV in your mark up and you want to apply different CSS class attributes if browse is IE6 / IE7/ IE8. Then just add a container div with id IE7 to this div. It can be added as this on ASPX page (Note- you can add this in Master page / specific page if you are not using Master Pages): -

<!--[if IE 7]><div id="ie7"><![endif]-->

      <div class=”category”>

This is div of interest where ie7 specific rendering should be done.

      </div>

  <!--[if lte IE 7]></div><![endif]-->

                The second change is in CSS file. All classes which should be handled specifically by IE7 css should be defined as #ie7. <classname>. Following example would make thing clear.

.category {margin-left: -20px;}

 

#ie7 .category { margin-left: 20px;}

                Generally I prefer to add this code immediately after body so that I can manipulate all CSS classes from the page.

Technorati Tags: ,,

Aug 20, 2009

Optimized way to get count of rows from a table

 

To get no. of rows from a table we usually use query

Select count(*) from table_name

But this query reads complete table to return no. of

Optimized way for performing this query is

Select rows from sysindexes where id= Object_Id(‘table_name’)

Technorati Tags: