Feeds:
Posts
Comments

Archive for March, 2007

      I was looking for the javascript to add the link in favorite. I have tried window.external.AddFavorite(location.href, document.title) which is working only in IE. I need to do that for firefox also. After spending few mnutes on google, I found the code working in both.
<script type=”text/javascript“> function bookmarksite(){         if (document.all)        {             // For IE             window.external.AddFavorite(location.href, [...]

Read Full Post »

           I was creating a search page and I require that when user press enter key, by default search button’s click event should be fire. I look around for the solution and find the easiest one. You just need to write below line in page load of  your code behind file.

Form.DefaultButton = btnSubmit.UniqueID;

           Here btnSubmit [...]

Read Full Post »

       In C# 2.0 there is a special datatypes called Nullable datatypes. You can assign null to them. Here is some basic information regarding Nullable data types.
        You can make any value types to nullable data types by writing as shown below.
public int? intA = null;
Fig – (1) Declaring integer data types so it can [...]

Read Full Post »

        Few days ago, I was recalling my Java script skill. I was generating Grid using java script script. Instead of using Display property (‘none’ or ‘block’) to show or hide the control, I was creating and removing element each time. Creating element is not a big deal. However the script for removing element is different [...]

Read Full Post »

       There is a common requirement to show records with serial number in Grid.  The common scenario is, we take template field and label in Item Template. In Row_DataBound we can generate serial number using variable which is increamnted each time. The another approach is to genarate this column in SQL itself. Yes you can do [...]

Read Full Post »

                Hi, I was working on small application and I had a requirement as described here. I was creating a page in wjich user can add multiple cotact detail for him. The page has facility for add, delete and edit the contact. I was storing all these information in view state and finally on Save [...]

Read Full Post »

           Hi, I saw many developers are asking this questions in different forums. Recently I saw this question on MSDN forum and I thought let me write a blog on this. I know many of us found this too easy however for new bees its bit hard.
            In this article, I had used SQL Server [...]

Read Full Post »

      I was reading about impersonation and delegation. The most common way I found for impersonation is to write  a tag “<impersonate = “true” username=”Name” password =”password” />”  in web.config file.  This will impersoname specific user to each request. I want to impersonate network user for only one request.
     In my project I have to create [...]

Read Full Post »