Loading ...

ASP.NET Blogs | CodeAsp.Net

Who is online?  0 guests and 1 members
home  »  blogs  »  blogs

Communifire Blogs

Blogs: Most Recent postings

Raghav Khunger

Custom handler to handle custom extensions

10/23/2010 by Raghav Khunger · 0 · 1049

In this blog I will show how to make custom handler to handle custom extensions. You may be familiar with .ASPX, .ASHX, .ASMX etc extensions, now how to handle the situations where we have the custom extensions say ".MyOwnExtension" . Let's start making our own custom handler to handle the extensions ".raghav" . Create a ClassLibrary Project and then a custom class "RaghavHandler" inheri...

Raghav Khunger

jQuery: How to make a simple tool tip plugin

10/23/2010 by Raghav Khunger · 0 · 4041

In this blog I will show how to make a simple jQuery tooltip plugin. Generally we need to show tooltips on hyperlinks t o show some information or detail regarding the link. Below is the screenshot how the tooltip will be displayed. Let's start writing the jQuery plugin. Here is the code for it : /* Tooltip plug-in */ (function ($) { $.fn.extend({ tip: function (options) { var defaults =...

mohit kumar

Get datetime out in 3 dropdownlists (day, month, year)

10/22/2010 by mohit kumar · 2 · 3411

Today I have read a question on forums asp.net. So I thought I should write a blog on this. Question - How do I get Date, month, year in three different dropdownlist? Well below you will see you how we can show Date, Month and Year in three different dropdownlist. Code - <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title>...

Vivek Thakur

Difference between HttpModule and HttpHandler in .NET

10/19/2010 by Vivek Thakur · 2 · 5350

Difference between HttpModule and HttpHandler in .NET This is quite a popular question in most .NET interviews, and all beginner .NET developers should be able to answer it. In this quick blog post I will try to simply the difference between these two pillars of ASP.NET programming model. To start with, it is very important to understand that all ASP.NET requests are handled by a web ser...

Hajan Selmani

Events and Delegates in C#.NET

10/19/2010 by Hajan Selmani · 18 · 6122

Short intro Many developers have already written some blog posts or articles regarding this subject. In the following blog, I will try to explain the concepts of using Events and Delegates in C#.NET and will try to keep it as simpler as possible, in order to give clear view to all those who are confused, especially about delegates . The first time I’ve started learning about C#.NET from ...

Hajan Selmani

Patch for VS 2010 “Scrolling Context Menu”

10/15/2010 by Hajan Selmani · 0 · 1912

Today (15 October 2010), ScottGu has posted a blog announcing a patch for one of the top issues with VS.NET 2010 reported by the users in Microsoft Connect, the Scrolling Context Menu. You can read ScottGu's blog here or you can go directly to the patch download page . There are actually two patches, one for VS.NET and another for WPF Hope this info is helpful. Regards, Hajan

Hajan Selmani

URL Routing in ASP.NET 4.0 Web Forms

10/15/2010 by Hajan Selmani · 1 · 4950

As a capability, URL routing was first time introduced in ASP.NET 3.5 SP1. The URL routing is well known in the ASP.NET MVC, but it can be also implemented in ASP.NET Web Forms Framework. URL routing can help a lot in Search Engine Optimization (SEO). What is it all about? Transforming the physical path of the URL to virtual path with different semantically meaningful URL name, easier fo...

samadhan khelukar

Validation with Regular Expressions Made Simple

10/7/2010 by samadhan khelukar · 2 · 1985

Hi, Here i am wirtting this bolg because, .net has great support for regular expressions, and it's hard to do input validation without them.My breaking point came this past 15days, as i wrote yet another coplicated method to comma delimited lists of integers. Well, for one thing, just about every article and book out there is geared towords using regular expression in text searches, rath...

samadhan khelukar

Reflection in Action | .net Java

10/7/2010 by samadhan khelukar · 0 · 585

Hi, I am writing this blog because, Reflection provides higher level abstraction, actually using reflection we can examine the object and handle that object at run time as per our requirement. For example, just before some time using reflection i am searching parent of the current object, and used that information for error logging purpose. objMethodBase = system.reflection.methodbase; P...

Raghav Khunger

Call JavaScript function after UpdatePanel has fired server side code

10/5/2010 by Raghav Khunger · 1 · 11273

Today a person asked on the forums on how to call a function or execute a JavaScript code after UpdatePanel processing is completed. I decided to write a blog on the solution which I gave to him. Actually we need to hook the events which are fired when the update panel is done with its processing and the event is Sys.WebForms.PageRequestManager endRequest Event. From MSDN : Sys.WebForms....

Raghav Khunger

jQuery: How to add or remove rows in a table

10/4/2010 by Raghav Khunger · 0 · 8573

Few days back a person asked on the forums on how to add and remove rows in a table with jQuery. I have decided to write a blog on the solution which I gave to him. I have created a sample code in which I have used a table and two input buttons. The first one is for adding a new row and the second one for removing the row. Here is the source: <html xmlns="http://www.w3.org/1999/xhtml"...

mohit kumar

What is IsPostBack in ASP.NET?

10/4/2010 by mohit kumar · 0 · 2540

Every Beginner have confused about IsPostBack property. Below you will find a very simple example of IsPostBack property. IsPostBack property returns Boolean value. It is used to determine if data is being sent back to the Web server or if the Web page is simply being requested. Example :- <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled...

Raghav Khunger

jQuery: How to get html of a div with that div tag included

10/4/2010 by Raghav Khunger · 0 · 3542

We all know how to get the html of an element with jQuery but what if we need the selector itself included in that html ?What I mean to say is suppose there is a selector <div id="foo" >foo</div> now simply calling $('#foo').html() will only return inner html i.e. "foo" only but we need the full html included selector too i.e. "<div id="foo" >foo</div> ". Below is...

Raghav Khunger

jQuery: Mutually exclusive checkboxes

10/4/2010 by Raghav Khunger · 0 · 1915

In this blog I will show you hot create mutually exclusive checkboxes functionality with jQuery. By mutually exclusive it means at a time only one element will be selected not more than that. Below is the sample code: <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/...

Raghav Khunger

jQuery: How to get the value of label

10/4/2010 by Raghav Khunger · 0 · 11248

In this blog I will show how to get the value of a ASP.NET label with jQuery, though it is a simple but it will help the starters in jQuery. I have created a sample code in which I have used one ASP.NET label and one ASP.NET input button. On clicking the input button the value of the label will be displayed in an alert box. Here is the source: <html xmlns="http://www.w3.org/1999/xhtml...

Raghav Khunger

Regex: How to replace everything which is not alphanumeric

10/4/2010 by Raghav Khunger · 0 · 1816

In this blog I will show how to replace everything in a string which is not alphanumeric with REGEX. I have used "[^a-zA-Z0-9]" as the pattern. Below is the complete sample code: #region Using Directives using System; using System.Text.RegularExpressions; #endregion public class Example { static void Main() { var regex = new Regex("[^a-zA-Z0-9]", RegexOptions.None); const string input = ...

Raghav Khunger

jQuery Colorbox: How to manually close colorbox with a button click

10/4/2010 by Raghav Khunger · 0 · 18447

In this blog I will show you how to manually close the colorbox modal with a button or an anchor's click. By default the colorbox modal provides you with a close link but if you need to still close it by some action this blog will will help you. From the colorbox plugin I found that in order to manually close it we need to execute "$.fn.colorbox.close()". Below is the sample code: <ht...

Raghav Khunger

Get TimeZoneID with input as numbers of hours difference

10/3/2010 by Raghav Khunger · 0 · 1744

Today we had a requirement where we were having the number of hours difference as the input and we need to extract the the timezoneid (from the timezoneinfo object) as the output. Below is the script: using System; using System.Linq; class Sample { public static TimeZoneInfo GetTimeZone(double hoursDifference) { return TimeZoneInfo.GetSystemTimeZones() .First(x => x.BaseUtcOffset.Tota...

Vivek Thakur

Difference between const and static readonly keywords C#

9/30/2010 by Vivek Thakur · 0 · 2553

Difference between const and static readonly keywords C# If in your C# class you want to use a variable whose value will not change during the lifetime of that class, then you have two options: 1. Use the "const" keyword: for e.g. public const int myVar = 100; 2. Use the "static readonly" keyword: for e.g. public static readonly int myVar = ConfigurationManager.AppSettings["value"]; The ...

Shaitender Singh

User Interface development tools

9/24/2010 by Shaitender Singh · 0 · 1894

User Interface development tools A number of tools exist which provide help for developing web solutions, here are few tools outlined below. Tool Browser Address Tool Use Fiddler ALL http://www.fiddlertool.com/fiddler/ Provides http tracing which is useful for debugging JSON posts. Web helper developer IE http://projects.nikhilk.net/WebDevHelper Provides http tracing and logging with an ...

Vivek Thakur

Difference between Cloud server and Virtual Private server

9/24/2010 by Vivek Thakur · 0 · 3266

Difference between a dedicated server, shared server, VPS and cloud hosting? Before the advent of the buzz-word "cloud", there were primarily 3 major hosting options for your web applications: 1. Shared Server : You share the server space and hardware (RAM, Disk size, CPU etc) with others on a single server. The server admin will allocate you a fixed hard disk space (database may be incl...

Rajesh Kumar

File watcher utility in C# .Net

9/22/2010 by Rajesh Kumar · 0 · 3902

In this post I will discuss how to create a file watcher utility and perform some tasks if a file is created, deleted, changed or renamed. FileSystemWatcher Class listens to the file system change notifications and raises events when a directory, or file in a directory, changes. We can use FileSystemWatcher to watch for changes in a specified directory or can watch for changes in files a...

Rajesh Kumar

Upload a file automatically to ftp server

9/22/2010 by Rajesh Kumar · 0 · 2316

In forum one member ask "how upload a file to server automatically ". So here I will discuss how we can implement a File Transfer Protocol (FTP) client in .NET. .NET Framework provides a class FtpWebRequest by using this class we can perform basic ftp operations as following. AppendFile Represents the FTP APPE protocol method that is used to append a file to an existing file on an FTP se...

Hajan Selmani

FAQ about the ASP.NET Security Vulnerability

9/21/2010 by Hajan Selmani · 1 · 1028

ScottGu wrote a new blog posts with the most frequently asked questions regarding the newest asp.net security flaw. Here is his blog post: http://weblogs.asp.net/scottgu/archive/2010/09/20/frequently-asked-questions-about-the-asp-net-security-vulnerability.aspx

Vijendra Shakya

C#: Find all "DayOfWeek" in a year

9/19/2010 by Vijendra Shakya · 0 · 2690

Here I have discussed about how to get all the dates of any Dayofweek in a year. Below is the stpes to caluclate all Dayofweek in a year. 1. Initialize a Collection for adding all Sundays in that. Collection<DateTime> listOfSundays = new Collection<DateTime>() 2. For that first we get the start date of the year as follows: DateTime startDate = new DateTime(year, 1, 1); 3. Now...

Product Spotlight

ASP.NET Hosting Spotlight

Join CodeAsp.Net for FREE Today!

It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.

enter your email address:

 

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?