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

jQuery Datepicker: Set date range of start date and end date

11/28/2010 by Raghav Khunger · 0 · 6802

In this blog I will show you how to set date range for start date and end date with jQuery Datepicker. There is a very common requirement where we need to allow user to select start date and end date but with condition that end date should not be greater than 7 (or n) days than start date. This blog will serve the same purpose. Below is the complete sample: <html xmlns="http://www.w3....

Raghav Khunger

Common add function in JavaScript

11/28/2010 by Raghav Khunger · 0 · 5043

Few days back a person asked on the forums on how to make a common JavaScript function for to add as many number as supplied in the arguments. I decided to write a blog on the solution which I gave to him. In JavaScript what ever arguments you supplied to the function is contained in the "arguments". I just run a loop over all the arguments and calculate the sum. Below is the sample code...

Raghav Khunger

How to get domain name from URL

11/26/2010 by Raghav Khunger · 0 · 2757

Today a person asked me on how to get the domain name from URL in ASP.NET, I decided to write a blog on the solution which I gave to him. Let's say you have a URL say "http://www.mydomain.com/test/default.aspx" and you want to extract "www.mydomain.com" from it. You can make use of UriInstance.Host property in order to get it. It brings the host component of the current Uri instance. Bel...

Raghav Khunger

Separate the config files in ASP.NET

11/25/2010 by Raghav Khunger · 1 · 1521

Config files are used to configure the initial settings of the application. You can have all the settings like appsettings and connection strings settings in a single web config file. But there is problem with this approach and I would suggest to go with separate files: Why different files and why not to keep them all in single web.config ? You can go simply with this approach but the pr...

Hajan Selmani

Case-insensitive XPath query search on XML Document in ASP.NET

11/24/2010 by Hajan Selmani · 0 · 1509

Sometimes we need to read XML files that are manually written by users and find some elements in the XML tree. Using .NET library, we can easily navigate throughout the whole XML file since the library has excellent support for working with XML files. One of the challenges you may come across is when you want to search for specific node in the XML file, but you are not sure about the let...

Hajan Selmani

Free e-book: Moving to Microsoft Visual Studio 2010

11/18/2010 by Hajan Selmani · 0 · 1349

I've just read the Gunnar Peipman 's blog on asp.net weblogs where he has mentioned this e-book . I haven't read the ebook yet, but I will surely take a look inside it in the upcoming weekend. Some links from the ebook webpage provided above You can download a PDF of the book here . You can download an XPS of the book here . And you can download the book’s sample code here . The table of...

Hajan Selmani

Working with System.Enum class

11/18/2010 by Hajan Selmani · 0 · 1392

Enums are types that provide way to restrict a given variable to one of the fixed set of values defined inside the enum. In most of the cases, enums are very good way to make your code look better and cleaner. Sometimes, we need to fill a dropDownList, CheckBoxList, RadioButtonList or some other control with the defined enum values. Using the System.Enum class, there are methods that we ...

Hajan Selmani

Organize 'Usings' directives in your VS.NET Project

11/18/2010 by Hajan Selmani · 3 · 964

Have you ever come in situation to have lots of 'Using' directives in your code file where you are not sure which can be safely removed or not? VisualStudio.NET enables you to safely organize your 'Usings' in your code file. Here is the simple trick. I have the following directives in my page code-behind file (you may have twice or more especially if you work on some big project dealing ...

Raghav Khunger

Force user to select multiple dropdownlists with jQuery

11/18/2010 by Raghav Khunger · 2 · 2868

Yesterday my teammate had a requirement to show alert to user if he has not selected the option from the dropdown. He had multiple dropdown list controls and wants that user should select each of these dropdown list and alert is to be shown to the user which will tell the user that he should select the option and then the focus should be put on the necessary dropdown list. So I thought t...

Raghav Khunger

ASP.NET: How to loop through dropdownlist items

11/18/2010 by Raghav Khunger · 0 · 6550

In this blog I will show you how to loop through dropdownlist items in ASP.NET. To show it I have posted a sample code below in which I have used a dropdownlist. On page load we will loop though all the items of dropdownlist except the first item (say the default one usually the "Please select" option). Here is the source code: In ASPX: <html xmlns="http://www.w3.org/1999/xhtml"> &...

Raghav Khunger

jQuery: How to delay the execution of functions

11/18/2010 by Raghav Khunger · 2 · 15911

In this blog I will show you how to delay the execution of jquery functions. There are situations where we need to execute a jquery function after some delay say after n number of seconds. To show it I have posted a sample code below in which I have used a div and a button. On clicking the button first the content of div will be faded in and after 3 seconds (which is the time which I hav...

Raghav Khunger

Facebox: How to manually close a facebox modal

11/18/2010 by Raghav Khunger · 4 · 13273

In this blog I will show you how to manually close a facebox modal. To show it I have posted a sample code below in which I have used a anchor tag to open the modal, a hidden div which will displayed in the form of modal, and input button in this modal to close the modal. Here is the source code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>&...

Raghav Khunger

TinyMce editor: How to save the content of tinymce editor textbox in textfile

11/18/2010 by Raghav Khunger · 0 · 9019

In this blog I will show you how to save the content of tinymce textbox in a text file. To show it I have posted a sample code below in which I have used a multiline textbox (which will be the tinymce editor), a button and a label. On clicking the button the content of the tinymce textbox will get saved in the textfile. Here is the source code: <%@ Page Language="C#" ValidateRequest="...

Raghav Khunger

jQuery: How get selected index of dropdownlist

11/18/2010 by Raghav Khunger · 0 · 24721

In this blog I will show you how to get the selected index of dropdownlist with jQuery. To show it I have posted a sample code below in which I have used one dropdownlist, a button and a label. On clicking the button the selected item's index of dropdownlist will be displayed in the label. Here is the source code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"&...

Raghav Khunger

jQuery: How to remove a class from a control

11/18/2010 by Raghav Khunger · 0 · 1579

In this blog I will show you how to remove a css class from a control with jQuery. In this example I have used a textbox (which is associated with ".mytextbox" class ) and a button. On clicking the input button the ".mytextbox" class of the textbox will be removed. Below is the source code for it. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> ...

Raghav Khunger

Disable enable checkboxes on click of other checkbox

11/18/2010 by Raghav Khunger · 0 · 4538

In this blog i will show how to disable and enable checkboxes on the click of other checkbox with javascript . I am explaining it by taking a example where there are three checkboxes . On the click of first checkbox the next two checkboxes will get enabled or disabled depending upon the checked state of first checkbox. Here is the sample code: <html xmlns="http://www.w3.org/1999/xhtml...

Raghav Khunger

Increase the number of recently open projects in Visual Studio

11/18/2010 by Raghav Khunger · 0 · 1842

Today when I opened my Visual Studio, in Recent Projects list at start up I found that a project which I was working 5 days before was not there, the reason was because I had opened many projects since then in my VS. My VS was showing 5 projects in recent project list so my requirement was to increase the number of recently open projects in visual studio, So I thought I should blog for i...

Tim Eisenhauer

jQuery Mobile Registration / Signup Dialog

11/17/2010 by Tim Eisenhauer · 0 · 15004

This is an addition to my series of blog posts on jQuery Mobile: jQuery Mobile Introduction & Tips To Get Started jQuery Mobile Getting Started jQuery Mobile Login Dialog Box So, if you've been following my posts so far, you should have a good overview of jQuery Mobile, it's documentation, how to set up your Visual Studio environment, the structure of a jQuery Mobile page, and how to...

Tim Eisenhauer

jQuery Mobile & ASP.NET Getting Started

11/17/2010 by Tim Eisenhauer · 0 · 16523

Like I said in my last blog post, jQuery Introduction & Tips , I've been following the development of jQuery mobile for some time now. And now that it's finally been released, I've decided to make some blog posts to help you get started. In today's post, I'm going to show you how to quickly set up your Visual Studio Environment to start using jQuery Mobile. First, you'll want to crea...

Hajan Selmani

Macedonian Code Camp 2010 event has finished successfully

11/17/2010 by Hajan Selmani · 0 · 663

Thanks to all attendees, contributors/sponsors, speakers and the organization board, the event ‘ Macedonian Code Camp 2010 ’ held on Saturday, 6th of November in Skopje (Republic of Macedonia) has finished successfully. PHOTO STREAM Here are some facts/numbers related to the conference: 500 attendees 200 streaming sessions 70 prizes 10h recorder presentation materials 1500 photographies ...

Tim Eisenhauer

jQuery Mobile Introduction & Tips To Get Started

11/17/2010 by Tim Eisenhauer · 4 · 7451

I've been closely following the development on the jQuery mobile since it's announcement -- and now that jQuery Mobile 1.0 Alpha 2 has been released, I though it would be a good time to see how things are going to work with ASP.NET. After taking a look through the documentation, I decided to dig in and start creating a mobile site for CodeAsp.Net. After a few hours of tinkering, I've fou...

Raghav Khunger

Windows 7: How to create a VHD file from an existing hard disk

11/6/2010 by Raghav Khunger · 1 · 6113

In this blog I will show how to create a VHD file from an existing hard disk. Virtual hard disk allows multiple OS to exists on a single host machine. It allows the developers to test their programs or softwares on different OS without the hassle of installing the second hard disk or creating an addition partition to do the same. From Wikipedia ( http://en.wikipedia.org/wiki/VHD_(file_fo...

mohit kumar

How to handle exceptions in ASP.NET

11/3/2010 by mohit kumar · 1 · 1635

If you are developing an application, you should prepare for exceptions in your application. Exceptions are part of the applications. An exception means an error and it is run time error. In this blog I will explain how to avoid these unwanted exceptions in your applications. Exceptions – As I already told you that exception is not a compile time error. Exception is a run time error. We ...

mohit kumar

Abstract class in C sharp

11/3/2010 by mohit kumar · 0 · 2254

There are different types of classes in C sharp like Sealed, Abstract, Partial, etc. In this blog I will explain abstract class in C sharp. Abstract class is very useful in C sharp. Below you will learn about Abstract class, Abstract methods and Abstract properties. There is main difference in Abstract class that Abstract class can’t be instantiated. An Abstract class is only a base clas...

Raghav Khunger

SQL: How to convert DateTime to Date

11/1/2010 by Raghav Khunger · 0 · 2037

In this blog I will show how to convert datetime to date in SQL. I have seen many people asking on forums regarding the same therfore I decided to write a blog on this. The logic of doing is simple, just strip the datetime upto 10 characters and convert it to date string of your desired date format. In this blog I have used 120 as the style of the date. You can get information on these f...

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?