Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Agha Usman

Lives in Riyadh(Saudia Arabia) belong from Karachi (Pakistan)

  • CLR Integration and Lightweight Pooling Conflict

    I thought I am CLR Integration Guru in Sql Server but this morning I came to know that there are lots of things left to grab. While I was moving the local database on the new live server I run some CLR Procedure which Says these procedures required CLR Integration enabled. So to get that done.

  • Prevent .js caching in asp.net

    This is like a very common issue, specially for those who are working on public site which is live and they have to release the builds every week or month and if the new build contain JS files then your change will not reflect on the client browser until someone there presses ctrl + F5.

  • Different Style for IE7 and Firefox in CSS

    Well, I with my designer Atiq was trying to set the a div which is working fine in IE7 but when it comes to Firefox, it was asking us to give the margin-top:10px. when we put that, the div comes down in IE7. So, in this situation we need to specify two different styles for these two browsers.

  • How to change default button of a form

    Often, we have condition when we have multiple forms on a page which have multiple submit buttons as well. Whenever, you press enter on any text box it will call the command button which is at top most sequence of command buttons.

  • Validate username using custom validation (AJAX)

    In this post, I will explain you how to have an ajax call on custom validator control and check for the username in the database. This task will include two pages one is the form page (default.aspx in our case) in which we have the custom validator and the other one is the page which we call through AJAX to give us the result (validateUser.aspx). You can also have a web service instead of that page but in my scenario , I am using ASPX page.

  • Get list of installed printers using C# WMI

    Well, almost about an year back I write an application which search for the available printer on the server and do some operation accordingly. Today while browsing my code library I found that small test application. So I thought it would be good to share this with the community.

  • ASP menu to show files in a folder

    In this post, we will see how can we fill the Asp Menu by specifying folder instead of some other data source. Following is the folder structure which this code is supported
    Root
    -> Folder 1 -> Files
    -> Folder 2 -> Files
    -> Folder 3 -> Files
    I mean, if there is another folder in Folder 1 or Folder 2 or Folder 3. The code will not detect because it is not recursive.
    So Let’s get down to the code