Share Your Source Code or Article

Do you have source code, articles, tutorials, web links, and books to share? You can write your own content here. You can even have your own blog.

Submit now...

Database Programming Made Easy

This tutorial will teach you step by step on how to connect and manipulate database. If you'd like to suggest a tutorial please write a comment at the bottom of this article.

Read more...

Hire Us to Do Your Work

Do you want a customized system? Do you want to setup your own website to do business? Then we are here to help you in your programming needs.

Read more...

Search



asp.net

Convert MonthName to MonthNo and vice versa

jitendramcu's picture
in

To convet monthname to month no. There are two approach are given below.
1)

  1. enum Months:byte
  2. {
  3. Jan = 1, Feb, March, April,

Show Source Code of Aspx webpage and code file in Browser window

jitendramcu's picture
in

For show your source code of aspx page, u have to used System.IO namespace 1) Read Default.aspx File

Add Meta Tag and Link tag in head section of page in Asp.net.

jitendramcu's picture
in

<link>-use to include css file in webpage.

protected void Page_Load(object sender, EventArgs e)
{
HtmlLink link = new HtmlLink();

To Change the Default web browser to other Browser in Asp.net

jitendramcu's picture
in

1)Right Click on the asp.net webpage in Solution Explorer window Click on Browse With, It display a window in which u can set Default browser,

Sending mail in Asp.net

jitendramcu's picture
in

For sending a mail in Asp.net,import System.Net.Mail Namespace. This is a simple application which u can use as a feedback form or contact us page.

Execute Commands Methods: How to use it?

planetsourcecode's picture

We have 4 types of Exceute methods, through which we can excecute the quries angainst Database.
1). ExecuteNonQuery(()
2). ExecuteReader()
3). ExecuteScalar()
4). ExceuteXmlReader()

1). ExecuteNonQuery(()
Explanation: Executes a command but does not return any value or output
usage conditions: UPDATE, INSERT, DELETE statements

  1. using System;
  2. using System.Data;

Check Existence of File in ASP.NET and C#

planetsourcecode's picture

We have to check if file exists before doing some things with that particular file. It will prevent error and work flow will be smooth, for this we have to include required namespace i.e system.IO;

  1. Using system.IO;

We have to place these controls on the webpage (ASPX page)

  1. Text box with ID=Textbox1
  2. Button with ID= button1
  3. Label with ID= label1

ASP.NET Validation Tips and Tricks (Part1)

planetsourcecode's picture

Tips1#

Validate an IP address
We can easily validate an IP address by Adding Namespace

  1. using System.Text.RegularExpressions;
  2.  
  3. public class IPAddressTextBox: RegExTextBox
  4. {
  5. public IPAddressTextBox()
  6. {
  7. InitializeComponent();
  8. this.ValidationExpression = @"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$";

Skins and themes in ASP.NET

planetsourcecode's picture

Sometimes we have to design those pages which have different color schemes but it is very difficult to maintain these types of pages. We can overcome from this situation by using skins and themes. This makes these things easier.

1). First create a Master Page having the following components.
* One Content Placeholder

2).Create another page (default.aspx) and select the Master Page

Syndicate content

Step by Step Java Tutorial

In this tutorial you will learn how to program with Java. It has a rich of information to be educated well with Java.

Read more...

Do You Have Question?

Do you have any question related to computer programming? Visit our forum and post new topic on the category you like. Be gentle when asking a question.

Ask now...

Point of Sale

Point of Sale is very useful especially for supermarkets or restaurants. I have included a barcode scanner in this program. Please check it out.

Read more...