Home | Articles|Namespace|Interview Questions|Tools|Jobs|Projects|Community
Asp.net Tutorials

»Dotnet Ads
»Message Boards
Message Boards
Dotnet Books

»Member Details
Register
Login
LogOut
Submit Code
Submit Jobs
Submit Projects

»Competition
Community
Winners
Prizes
Write For Us
Members

»Other Resources
Links
Dotnet Resources

ASP.NET tutorial, ASP.NET Code

selecting a drop down list text field by giving the text field - Monday, November 28, 2005
This code shows how to To select a drop down list text field by giving the text field parameter
To add check box Control to the datagrid list - Wednesday, April 12, 2006
This code shows you how to add a check box to the datagrid items
Adding a new list item to a drop down - Sunday, November 27, 2005
To add a new list item at run item to a drop down list with values
To add sorting to a datagrid - Sunday, November 27, 2005
This code shows you how to add sorting to a datagrid
Splitting a string in C# - Monday, November 28, 2005
Splitting a string in C#
adding datagrid items at run time - Monday, November 28, 2005
To add datagrid items at run time using for loop
Adding attributes to a control in a datagrid - Monday, November 28, 2005
Adding attributes to a control in a datagrid
Code to get current month and day - Tuesday, November 29, 2005
Code to get current month and day
Adding a Confirmation message box - Tuesday, November 29, 2005
Adding a Confirmation message box to a delete command button in a Datagrid column before deleting from a table in a database
Code to enable forms authentication in asp.net - Wednesday, November 30, 2005
Code to enable forms authentication in asp.net
Getting multiple resultset from a query - Wednesday, November 30, 2005
This code shows you how to get multiple resultset from a query to a datagrid
Date Object - Thursday, December 1, 2005
Date Object to use in Flash Actionscript 2.0 and it can be converted to c# also very easly! see working example:www.flashdlt.com/apps/dttime
Code to convert a datagrid data to excel and to zip - Friday, December 2, 2005
This code helps you to convert a datagrid data to excel and also to get a zipped file.
Hosting multiple websites on one domain - Saturday, December 3, 2005
Have you ever wondered how you could host multiple websites on one domain hosting service. Well it is simple with this asp.net script i achieve just that. This is very usefull for people like us who dont want to invest a lot of money for domain hosting.
Writing a file to the browser as an attatchment - Tuesday, December 6, 2005
This code shows you how to write a file to the browser as an attatchement which then can be saved by the user
Converting a DataGrid to HTML and outputting it to screen - Friday, December 16, 2005
This code shows you how to convert a DataGrid to HTML and outputting it to screen
RegEx expression to remove the string between two types of string - Friday, September 8, 2006
This code shows you how to remove a string that is between two strings
Grabbing a string of digits from pair of double quotes - Friday, December 9, 2005
Using C# and .NET's regex engine, how to grab a string of digits that are inbetween a pair of double-quotes ?
Code to render a control to HTML - Tuesday, December 13, 2005
This code shows you how to render a control datagrid,repeater and other controls to a html.
Code to get the filename from a filepath - Friday, December 16, 2005
This code shows you how to get a filename from a filepath
Code to check if a file is a right format - Friday, December 16, 2005
This code will show you how to check if a file format is right
Storing a uploaded file in binary format in a database - Friday, December 16, 2005
This shows you how To upload a file In binary format to a database
Code To convert a file To bytes - Friday, December 16, 2005
This Function converts a file To bytes And returns it
Datagrid: delete row with confirmation is convert field into template field - Friday, February 3, 2006
Confirmation box before you delete a row in a data grid
Default ASP.NET link button - Monday, February 6, 2006
I haven't really thought about this in a long time, but after searching a bit and finding some really complex solutions, I figured out a way to fire a "click" based on pressing enter in a text field. It works OK in IE and Firefox, which is good enough for me, and it only requires one line. EmailTextBox.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + LoginButton.UniqueID + "','')"); "EmailTextBox" is as you might suspect a text box control, while "LoginButton" is a link button. All it does is render an extra attribute in the rendered tag that checks for a key press, and if it's the enter key, it fires ASP.NET's __doPostBack method with the unique ID of the button that you want to virtually press. That in turn fires off whatever server-side event handlers you've wired up. You could pass in the eventargument as the second parameter in that Javascript if you wanted to. I can't understand why this wasn't included somewhere in v2. They did offer a default button for the entire form, but I think that only works if you have actual buttons (I use LinkButtons almost exclusively). You could actually wire up any control name here if you wanted.
Sorting a drop down list - Friday, February 10, 2006
This code shows how to sort a Drop Down List. This code was added to a Drop Down List custom control.
ASP.net Paging in DataGrid - Monday, February 13, 2006
This code shows you how to add paging to a datagrid
Select unselect all check box in a page - Monday, February 13, 2006
Check uncheck all check boxes in Asp.net using javascript
ApplicationPath function - Tuesday, February 14, 2006
This function returns the Application path, like http://www.JoesWebsite.com/, or if the project is running in a virtual directory it returns the Application path of the virtual directory, like http://www.JoesWebsite.com/forums/ .
MappedApplicationPath function - Tuesday, February 14, 2006
This function returns the Mapped path, like "D:\Hosting\Smith\JoeSmithWebsite\"
Displaying a password as * format - Thursday, February 16, 2006
Code to Display a password as * format
Displaying credit card info on screen in XXXX format - Thursday, February 16, 2006
Code to display credit card info on screen in XXXX format
how to set a link button as default button - Tuesday, March 7, 2006
Slecting a dropdown list in a datagrrid - Tuesday, March 14, 2006
To select a drop down list in a datagrid during run time
How to change the color of a selected datagrid item - Tuesday, September 26, 2006
This simple code shows you how to do just that
Selecting and changing color of a datagrid column dyanmically - Tuesday, March 14, 2006
This code shows you how to do that
How to create a Sorting arrow in the datagrid sort - Thursday, March 16, 2006
Datagrid does not come with a deafult sort arrow so we have to show our own this code does just that
Listing Distinct Rows From Data Table - Thursday, March 16, 2006
This code shows you how to do just that
Setting focus on a control using javascript - Friday, March 24, 2006
This code shows you how to set focus on a control using javascript in asp.net
Dynamically changing datagrid using code - Tuesday, March 28, 2006
This code allows you change the property of a datagrid dynamically
Clearing all field in a web form - Wednesday, April 5, 2006
This code shows you how to clear all field in a web form. It is very usefull in a page where there are a lot of text fields , check boxes which needs to be cleared with the press of a button
Displaying alphabets on the screen using char command - Wednesday, April 5, 2006
This code will show you how to display alpabetical characters from A - Z. this can usefull in link maps
Parsing URL - Wednesday, April 5, 2006
Function to Parses a URL and returns the final '.aspx' name
Create Data Table from CSV - Thursday, April 6, 2006
This function creates a DataTable from a CSV file.
File to bytes - Thursday, April 6, 2006
Function to return the posted file in byte format
Control to String Format - Thursday, April 6, 2006
Converts a web control such as a DataGrid to a string representation
DataGrid to Excel - Thursday, April 6, 2006
Function to convert a Datagrid to a Excel format
Reseting a form - Tuesday, April 11, 2006
Function to reset a form controls
hide controls - Tuesday, April 11, 2006
This simple Function hides the controls
How do i add a image to a datalist ? - Tuesday, April 25, 2006
This code will showyou how to add a image to a datalist
Only Unique numbers in a text field - Wednesday, April 26, 2006
I faced a problem where i the user can enter only unique numbers in a text field in a asp.net page. for example if there are four text fields there should be only unique numbers if all the fields are filled and i enter a duplicate number it will change the other text field with the same number to a different number this javascript code does just that i hope it will be of some help to some one also the ctl object should be the asp.net control name
Asp.net Page data caching - Friday, April 28, 2006
Imagine a scenario where you have thousands of people visiting your website that means thousands of Continuos requests to the server and database which would result in severe performance hit. To avoid this unnecessary trips to the server and database we can use the Asp.net page out put caching techniques.
formatting time and sending as parameter to sql - Monday, May 8, 2006
formatting time and sending as parameter to sql
adding a row in a drop down list before databinding - Wednesday, May 10, 2006
This code shows you how to add a row in a drop down list before databinding
Sql transaction in asp.net - Wednesday, May 10, 2006
This code will show you how to use Sql transaction in asp.net
Valid MAC address function - Wednesday, May 10, 2006
Function to check whether a MAC address is right
Javascript function to check number of check boxes checked in ASP.NET Page - Thursday, May 18, 2006
This function can be used to check if a user selected more than one check box
Creating and populating a DataTable Dynamically - Thursday, June 22, 2006
This code shows you how to populate a datatabe dynamically it has a lot of uses.
Hide and Unhide controls - Friday, July 7, 2006
If you are a asp.net coder you have always come accross times when you needed to hide and unhide controls.
how to use server side controls in client side - Saturday, July 8, 2006
Search Engine Friendly URL Rewriting in ASP.NET - Wednesday, August 23, 2006
Companies spend a lot of money on their websites. But they dont get the results they want. Some of them use database driven web pages Unfortunately, most of these database driven web sites rely heavily on parameters to display contents since parameter passing is the easiest way to pass information between web pages. But it comes with a price. Search engines cannot or will not list any dynamic URLS. Dynamic URLs are said to contain elements such as ?, &, %, +, =, $. Hence, the pages which the hyperlinks point to will be ignored by the Web spider indexing the site.
What is session state - Thursday, July 20, 2006
Text that appears on the home page
What is view state - Thursday, July 20, 2006
Text that appears on the home page
Using RegisterClientScriptBlock function - Tuesday, July 25, 2006
This simple code shows how to use the RegisterClientScriptBlock function in ASP.net
Using RegisterStartupScript function - Tuesday, July 25, 2006
This simple code shows how to use the RegisterStartupScript function in ASP.net
Asp.net Page output caching - Saturday, July 29, 2006
This small article shows how to use page output caching to make your asp.net pages load fast.
A potentially dangerous Request.Form value was detected fix - Friday, August 4, 2006
When entering a value with angled brackets into a text box on a .NET application the following error is generated in the browser:
Set Focus to an ASP.NET Control - Wednesday, August 9, 2006
This small code shows how to set a focus to a asp.net control
javascript Window onclick event handler - Wednesday, August 9, 2006
This small code showshow to use the window onlclick event handler
Asp.net and javascript character counter script - Thursday, August 10, 2006
This small code shows how to add a Asp.net and javascript character counter script
About javascript confirm - Friday, September 1, 2006
Text that appears on the home page
Inserting into textarea at cursor position - Thursday, September 7, 2006
Inserting into textarea at cursor position how to insert text into a textarea at the current cursor
Moving items between two list boxes - Thursday, September 7, 2006
This code shows how to move items in a list box from one to the other in ASP.NET using javascript
hide ASP DATAGRID - Friday, September 22, 2006
Text that appears on the home page
Date Format - Monday, September 25, 2006
Text that appears on the home page
Uploading a photo and display it immediately in ImageButton. - Thursday, September 28, 2006
Text that appears on the home page
Opening a web page from a website and loading it in a asp.net page - Tuesday, October 3, 2006
This simple code shows how to do it. I was looking for this every where finally i decided to write my own
Changing the html before in a asp.net page - Thursday, October 12, 2006
This code shows how you can change the html before being rendered in asp.net
DataGrid Currency Format - Tuesday, October 10, 2006
This code shows how to format currency in a DataGrid
Generating Registration Image on FLY - Tuesday, October 10, 2006
This article focus on generating image on fly in asp.net. This is very basic functionality which you find on almost all the website which require registration of user. Example: Yahoo Registration require to type you secret string before you can successfully login, this feature has no. of reasons and i am not going into detail of why we want rather i am explaining here how we can. Look for Screenshot for better idea.
Getting values from a multiple selected item in list box - Thursday, October 12, 2006
This code will show you to get the multiple selected items in a list box
Changing a myspace layout in css - Friday, October 13, 2006
This code show how to change a myspace layout
Changing myspace Backgrounds using css - Friday, October 13, 2006
This simple code shows how to change the background of your myspace color
DataGrid - Tuesday, October 17, 2006
Text that appears on the home page
ASP.NET , C# coding standards - Friday, October 20, 2006
Some basic coding standards for .NET
Generate Random Number STAYS SAME FOR THE ENTIRE DAY - Wednesday, December 6, 2006
Generate Random Number STAYS THE SAME FOR THE ENTIRE DAY and has a min max value
Upload - Thursday, December 7, 2006
Text that appears on the home page
Asp.net Web service tutorial - Thursday, December 21, 2006
A simple Asp.net Web service tutorial
Adding sorting to a datagrid in ASP.NET and C# - Thursday, January 25, 2007
This small piece of code shows how to add sorting in a datagrid in asp.net c# the earlier one we have on this site is in vb.net
Adding a new row to a datagrid during run time - Thursday, March 1, 2007
This is a code that i found online it can be used to add a row to a datagrid data it is really cool
Learn to AJAX-enable an existing ASP.NET website - Monday, June 4, 2007
Learn how to AJAX-enable an existing ASP.NET web page using AJAX Extensions. The UpdatePanel control provided by the framework makes it really easy to start with AJAX programming by defining the areas of the page you want to update independently without a full page reload. http://www.innerworkings.com/Contests/Contest.aspx?id=66
Adding Items in DropdownList Box - Thursday, June 7, 2007
Adding all possible colour names in a DropDownList Box...Try It!!!!!!
Using SqlConnection to add items to DropDownList Box - Thursday, June 7, 2007
Using SqlConnection object to fill up a dataset and using this dataset to add items to a DropDownList Box.
Populate Gridview with data - Thursday, June 7, 2007
Populate Gridview with data
Create HTML Banner with ASP.Net - Thursday, June 7, 2007
Create HTML Banner with ASP.Net
Export Gridview data to excel using xsl - Thursday, June 7, 2007
Export Gridview data to excel using xsl
Export Gridview data to excel using StringBuilder - Thursday, June 7, 2007
Export Gridview data to excel using StringBuilder
Export Gridview data to excel Using Excel Application object - Thursday, June 7, 2007
Export Gridview data to excel Using Excel Application object
Delete Gridview data after confirmation - Thursday, June 7, 2007
Delete Gridview data after confirmation
RowDataBound and PageIndexChanging Events of Gridview - Thursday, June 7, 2007
RowDataBound and PageIndexChanging Events of Gridview
Dynamically setting title of pages - Wednesday, July 4, 2007
How to dynamically set title of pages
Show date as today and yesterday in c# - Monday, September 10, 2007
This small peice of code shows date as today and yesterday
AutoGenerated Serial Numbers in DataGrid - Monday, October 1, 2007
change the specific Row / Column color in DataGridView - Thursday, October 18, 2007
change the specific Row / Column color in DataGridView
Assign Selected Date From Calendar to TextBox - Thursday, October 18, 2007
Assign Selected Date From Calendar to TextBox
To generate MD5 of any type of file - Thursday, October 18, 2007
To generate MD5 of any type of file you can use this
Add DropDownList to DataGridView at run time. - Monday, October 22, 2007
Add DropDownList to DataGridView at run time.
Using your web page Session in Class of that web application - Monday, October 22, 2007
Using your web page Session in Class of that web application
OnMouse effects on GridView Row / Column - Monday, October 22, 2007
OnMouse effects on GridView Row / Column
Authanticate UserName,Password in the Database using C# and SQL Server - Wednesday, October 24, 2007
Authanticate UserName,Password in the Database using C# and SQL Server
New Features in Asp.net 2.0 A beginner point of view - Monday, October 29, 2007
This article explains latest features of .net2 in a simpler way
Color Full DropDownBox - Monday, December 3, 2007
Color Full DropDownBox
Common ASP.NET Performance Myths - Tuesday, February 26, 2008
Passing events from a control to the page - Wednesday, February 27, 2008
code to pass events from a control to a asp.net page
KCallback.net - Tuesday, March 11, 2008
KCallback.net Control, the most powerful, robust, callback control available in the market today for ASP.NET with AJAX support. Written in 100% managed C# code, KCallback.net provide callback functionality in your web applications. The KCallback.net control allows developers to AJAX-enable any ASP.NET application with writing a few lines of code. It allows to update page content without postback and loss of scroll position!
Data grid view multiple checkbox selection - Friday, April 4, 2008
This code shows how to use data grid view and check boxes
c# extracting domain from a url - Friday, April 18, 2008
I was scouring the web for a function which can extract domain from a url and came across this code
- Monday, June 30, 2008
I have checkbox in template field in a gridview and on checkbox selection in a gridview , I want only selected row in a gridview to be transferred into excel.
© 2008 dotnetwatch.com -- Privacy policy