Articles (2397) - Page 160

Articles posted by registered members of You can also post an article and win monthly prizes as well as gain community credit points.

2397 records found.
Traversing through all the dates in the given range of two dates 
Last updated on: 12 Nov 2007 06:12:29 AM by Satish | Views: 5027 | Category: JavaScript |
Here was the challenge for me, I had two dates like FromDate and ToDate. Lets say 01/01/2007 as FromDate and 01/01/2008 as ToDate. I need to traverse through all the dates in the given period. Initially, I was facing a lot of problem, however after many trial and error, I got it. Wish to share the code.
Query foreign keys of all tables in a given database in SQL Server 2005 
Last updated on: 07 Nov 2007 06:05:45 AM by Deeraj | Views: 9865 | Category: Sql Server |
At times as a DBA/DB Programmer we may need to generate a report on foreign keys across all the tables in a given database. It would be a tedious job to use the SQL Server Management studio and build a relationship diagram. Here is a tip to quickly query the meta data and depict all the foreign keys.
Web Analytics 
Last updated on: 19 Oct 2007 11:54:48 AM by Amitgupta007_99 | Views: 6488 | Category: Web Analytics |
What is Web Analytics?
Change theme dynamically without page refresh in ASP.NET 
Last updated on: 10 Oct 2007 07:18:41 PM by SheoNarayan | Views: 37528 | Category: ASP.NET |
You must have noticed one link in, or other popular websites named "Page Options". When you click this link you get a popup displaying different small several color icons. After clicking one of these icons your page theme changes without entire page refresh. Now you are able to see the same page with different look and feel.
Looping through all rows of the DataTable 
Last updated on: 08 Oct 2007 06:54:47 PM by SheoNarayan | Views: 91582 | Category: C# |
Votes: 2 | Rating: 5 out of 5
Here is the working example of looping through all rows of the DataTable. You can download the code and simply run it by placing to your IIS root folder. Let me explain you looping through all rows of the DataTable step wise.
Splitting string in C# 
Last updated on: 01 Oct 2007 06:00:22 PM by SheoNarayan | Views: 33399 | Category: ASP.NET |
Votes: 1 | Rating: 5 out of 5
Here is a very simple example of how to split a string delimited with a particular character or string. I know this is very simple to do but I have find many people struggling in doing that. Attached code also demonstrate how to use StringBuilder, Foreach loop, Regex etc.
Generating Ms Excel file from GridView with ASP.NET and C# 
Last updated on: 12 Sep 2007 05:30:33 PM by Sheonarayan | Views: 37691 | Category: ASP.NET |
Votes: 1 | Rating: 5 out of 5
I was having one requirement of giving an option to the user to generate the Ms Excel sheet from the report that was given to the user in GridView. Initially it seems difficult but when I worked around, I found really easy way to do that.
  • Amitgupta007_99 redirection 
    Last updated on: 23 Jul 2007 11:10:40 PM by Amitgupta007_99 | Views: 5744 | Category: ASP.NET |
    The easiest way to make a redirection in ASP.NET is using Response.Redirect(url). What it actually does is, that it creates a response with the "302 (Object Moved)" status code and the target destination. It tells the browser that the requested page is temporarily moved to a new location and then the browser makes a request to the new destination. If the page is permanently moved, then the 302 status code is no longer correct. Search engines also looks at 301 and 302 redirects differently. Here's a quote from The Internet Digest: There is no natural way of doing a 301 redirect in ASP.NET, so you have to set the HTTP headers manually. Below given is a small method that illustrates how to do it. All you have to do is to call it from the Page_Load or preferably from Page_Init or in ASP.NET 2.0 Page_PreInit.
    sending email using 
    Last updated on: 20 Jul 2007 04:49:56 AM by Chinnu21 | Views: 13705 | Category: ASP.NET |
    Below is a C# and VB.NET class that demonstrates using System.Net.Mail to send an email.
    Resizable GridView Column 
    Last updated on: 12 Jul 2007 02:45:48 AM by Deysomnath | Views: 27877 | Category: ASP.NET |
    This article will help us to implement resizable gridview column There's four important points to remember about it all. 1.Based on how the code is written, the Grid that has resizable columns must be contained in some other element (in these examples I use a DIV) and that element must have a style set of "position: absolute;". You need this to size the black vertical bar that attaches to the mouse correctly when performing an actual resize. 2.Based on how the code is written, you can only perform resize operations on table header cells (TH tags). This simply feels like the right way to do it - you could make it TD tags instead, and be able resize the column for the entire height of the table if you wanted to. 3.The actual table must have a style set of "table-layout: fixed;" If you don't set this style, strange things happen (try it and see, it goes all loopy when you resize . 4.To save having to remember to put too many requirements in the implementation, the black ve ...
    Avoiding dropdown appearing over div 
    Last updated on: 05 Jul 2007 10:57:23 PM by Animesh | Views: 5601 | Category: ASP.NET |
    Hi all i am sure many of us has faced problem of dropdown comming above the div here is a small solution for this May be you can try this it really works.....
    Value based sorting on key value collection 
    Last updated on: 27 Jun 2007 01:33:39 AM by Animesh | Views: 8994 | Category: ASP.NET |
    Votes: 1 | Rating: 5 out of 5
    Guys has anybody faced problems with the Key, value pair collections not sorting the collections based on values . As all the collections sort themself on keys . As i needed a collection of Key,Value pairs which does sorting on values rather than key, For that reason i have created my own collection class which dose sorting on the values. And this is working perfectly for me .