IIS Website relaunched by Microsoft for the launch of Windows server 2008

Hi,

With the launch of Windows Server 2008 today Microsoft also relaunched the website for IIS.  Do check the newly relaunched website of IIS here

 

Vikram


SharePoint Permission problem when programming Object model with trust level WSS_Minimal

Hi,

 

Last few days I was playing with SharePoint server 2007 and programming with it. All I was trying to do was add a list item in a simple list created in the SharePoint through a web part. The code to do the job was simple enough.

Continued...

Content Page referencing content in Master Page

Hi,

 

Many a times while using a master page we want to refer content, Controls and properties in Master Page while working in Content page. We come across requirement where by we can change or access the values of controls residing in Master page when we are coding in the content page itself.

 

We can write code in the content pages to access properties, methods and controls in the master page, but there are some limits to it. We can only work with those properties and methods which are declared public. For controls we can refer any control on the master page independent of referencing public member.

Continued...

Redirect and refresh a page using the Meta tag

Hi

 

Many a times we have a requirement where by we want to make a pager refresh by itself at a certain interval. We may also want to redirect the page to another page after a certain amount of time. I know we can do this with the help of Asp.Net Ajax Extension’s Timer control. But that can only be used when you are using Ajax in your page and more importantly should be used when you have requirement to update some small section of the page. For this requirement we can simply use a Meta tag in the Page header.

 

Continued...

February CTP for SQL server 2008 has been launched

Hi,

 

As all of us know that SQL server 2008 Launch has been delayed to 2nd half of the year, but the Feb CTP has been released. The CTP is feature complete. The CTP include better functionality for Data compression, Policy based management enhancement. Integrated full text search engine and many more functionality.

 

Continued...

Obsolete API list for Dot Net framework 2.0

Hi,

Microsoft has come out with a list of APIs which have become obsolete in the .Net Framework 2.0. The same can be accessed from: .NET Framework V2.0 Obsolete API List. The list also contains alternate APIs that can be used for most of the obsolete APIs. In case there is no alternative suggested then this means that there is no replacement for the API.

You can also check the list grouped upon Asembly Here and Grouped by Namespace here.

Vikram


Using ObjectDataSource and passing Object as a parameter

Hi,

 

ObjectDataSource was a great addition to Asp.Net 2.0. But when working with asp.net 2.0’s ObjectDataSource had one limitation when working in Visual Studio designer. When working with ObjectDataSource we cannot pass object as a parameter. We always need to pass string, integer etc as the parameter.

 

But many a times we want to pass some object as parameter instead of passing all the values as string. Passing all the values can also be difficult when working with large number of columns.

 

Continued...

Asp.net Timer control tweaking on the client side

Hi,

Few days back I saw this question in the forums and from then I was looking for an answer for it. The Timer control in the asp.net Ajax is pretty useful when we want to do some activity on the client side at a certain interval of time. The control also gives us good control on tweaking it on the server side. But Sometime the requirement is such that we want to change the value of timer interval, or stop the timer on the client side itself.

A few days back I learned that the timer control can easily be tweaked in the client side also. Let’s assume we are using a timer control with ID Timer1.

 

var Timer1 = $find(‘<%= Timer1.ClientID %>’);

 

Continued...

C Sharp and yield keyword

Hi,

 

One of the cool and yet most unknown feature of the C# is the yield keyword. The yield keyword is used in an iterator block to provide a value to the enumerator object or to signal the end of the iteration. When used the expression is evaluated and returned as a value to the enumerator object. Note the expression has to be implicitebly convertible to yield type of the iterator. Here is an example

 

Continued...

Concurrent request and how session behave

Hi

 

We all have worked with Asp.Net session objects in some point of time. An interesting question came in between the discussion with my colleagues on concurrent request and session state.  Here is what I have to share with all on session and concurrent users.

Continued...

Use Retail attribute to define that all the application run in release mode only

Hi,

 

Lets say you are running multiple application in a single machine, and want to make sure that all the application run in the release mode (debug is false, page output of trace is false etc..). These settings can easily be changed in the web.config. and you do not want any application to run with these setting even by mistake.

Well Asp.Net has a way for that also. You can set the attribute retail to true in the deployment tag inside the System.Web tag in Machine.config.

 

<System.Web>

   <deployment retail=true />

Continued...

Template column and HTML Encoding

Hi,

 

I have seen this question a few times in the forum so decided to blog on that. Many a times we store HTML characters in the database. When we want to show these values in the Gridview, detailsview or similar control.

But when we are displaying the value we want to encode (or sometime even decode) the value displayed. With bound column we get a property to HTMLEncode the value, but what do we do when we are using template column.

 

When we are using template Column we have two ways to HTML Encode (or decode the data). Firstly we can do the encoding in code in the rowdatabaound event

Continued...

Using 301 redirect in the Search Engine friendly web world

Hi,

When working in a Search engine friendly world, every small detail in your page and programming matter on how you can move your site in top position in the search engine. One of those important matter is how we redirect a page to another page.

 

By default we use response redirect which causes a 302 Redirect. For a search engine 302 redirect means that the document has only been temporarily moved and not permanently, hence the search engine will continue to index that page and show it in search result.

Continued...

Ajax extension caused the site to go on a small outage the whole day

Hi

Sorry for the temporary outage of the site. Not sure what the problem was. But the site suddenly started giving some error in the ajax extension used in the site. I never changed the code of the site, but suddenly saw some problem with the Site.

The error was happening only in the server and nothing in the localhost, and Googling did not help anyway. So all I did was upload the bin folder again and things started to work fine again.

Vikram

Multiple column sorting in dataview

Hi,

 

Yesterday I was wondering through the msdn and found an interesting stuff that I did not knew before. I have worked with Dataview many a times and know how to work with it sort property. The sort property takes a string. The string is the columnname on which the dataview will be sorted.

 

What I did not knew was that the dataview can be sorted on multiple columns using the sort property. For sorting the columns on multiple columns we need to separate the columns with a comma. To define the sort direction we can use ASC or DESC after the column name.

Here is an example on how to sort a dataview in multiple columns

Continued...

New Blog at Weblogs for me

Hi,

Thanks so much to Joe Stagner, for giving me the chance to add my blogs on weblogs.asp.net/Vikram. Yes the new account was created yesterday evening. I will be posting by blogs there also. But don’t worry I will continue to cross post my blogs here also, So if you have subscribed to this blog you will have all the updates regularly.

I decided to use weblogs also for the purpose of visibility. Because of http://www.vikramlakhotia.con being a personal domain, the visibility of the blog has been on the lower side. So to increase the volume of people to my site, I decided rto cross post at weblogs.

Vikram


Hot fix for visual Studio 2008 available for download

Hi,

Microsoft has just released the Hot fix for Visual Studio 2008, web development. The hot fix is for the performance issue caused in the VS 2008 in the HTML source View and design view. You can download this hot-fix roll-up for free here.

The hot fix solves a lot of problem related to HTML: source view performance, Design view performance, HTML Editing, Javascript Editing, Web Site build performance etc.

For more on the Installation please visit

http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx

Vikram


Changing the version in asp.Net restarts the IIS

Hi,

 

One of thing that one of my friends told me (and I was surprised to know that) was that when we change the asp.net version in the IIS the IIS is restarted. This has been done with intension and has its reason behind it. But all these working with IIS and asp.net I have never noticed about it. So next time you change the version of Asp.net in IIS remember it will cause the IIS to restart

 

Vikram


Showing row number in Gridview

Hi,

 

A few days ago some one asked me this in a mail. After thinking on this a bit I decided to make a post as I thought this might be useful to many. Many a times while using a Gridview or a Datagrid we want to show a row number along with the Row, so that its easy for the user. The row number should always start from 1 no matter what the sorting is.

 

Continued...

Product comparison of Visual Studio 2008 various editions

Hi,

I have seen many people asking me or in the forum about the difference between the various version of Visual studio and which one should they use. Well the one you should use is dependent on your requirement.

 

You can find the difference between the various edition of Visual Studio 2008 here in this product comparison

 

http://msdn2.microsoft.com/en-us/vstudio/products/cc149003.aspx

 

Continued...

Ruby.Net the letter that made the announcement

Hi,

 

Its actually a sad news to hear. But the hard work spent on Ruby.Net is over. Here is the letter sent to announce the same

Continued...

Problem with Contact me section solved

Hi,

 

Of late I found that I have stopped receiving any mails from the contact us system. I thought may be no one is using it at all. But When I found that the number of comments inflow has been good and no contact mail I was a little surprised.


I checked the system and found that there is a problem in the mail sending system for which mails from contact me was not being delivered. I have corrected the same and now everything is working fine with contact me.

 

Continued...

How to run a query in all the database in the server

Hi,

What do you do when you have to run some query in all the database in the server. Like To know all the relationship in all the database or to know the name of the table, procedure in the database in the server. The requirement can also be to know all the running process in all the database in the server etc.

In know all of us can write a small little curser after querying the sysdatabase for the all the database. But SQL server comes with a same purpose that is made for this purpose.

We an use the Stored procedure sp_Msforeachdb which takes a string (the query that should be run against all the database in the server.) Here is a way to use the stored procedure

EXEC sp_MSforeachdb 'USE ? SELECT name FROM sysobjects'

The question Mark (?) placeholder is used in place of the name of the database.

Continued...

Letter sent By Steve Ballmer (Microsoft) to buy Yahoo

Hi,

Here is the exact transcript of the letter send by Steven Ballmer to Yahoo to purchase Yahoo.

January 31, 2008

Board of Directors
Yahoo! Inc.
701 First Avenue
Sunnyvale, CA 94089
Attention: Roy Bostock, Chairman
Attention: Jerry Yang, Chief Executive Officer

Dear Members of the Board:

Continued...
 
Copyright © 2006 - 2008 Vikram Lakhotia