Who is online? 97 guests and 0 members
Member login | Become a member
CodeAsp.Net's ASP.NET Blogs is more than just a social community for ASP.NET bloggers - we are one of the largest ASP.NET blog directories on the internet. Whether you are looking to search ASP.NET blogs, connect with ASP.NET bloggers, learn more about ASP.NET, or promote your own blog, CodeAsp.Net is for you. Be sure to check back often as we add new ASP.NET blog postings frequently.
In this blog I will explain Literal control in ASP.NET. The Literal control used to display static text on a web page. Literal control is not rendered as a <span> tag like label control. The Literal control doesn’t inherit from WebControl and we can’t apply style to its content because it doesn’t have a style property. There is a Mode property of Literal control. There are three modes available in literal control – Encode Mode – If I set Encode Mode, HTML tags and script is treated like te...
Read More
Yesterday, I was sitting with my college friends at a coffee shop. One of my friends asked me a question that how we can find highest second and lowest second number in a particular array, and without the help of any function like orderBy. So, I took a notebook and solved his question. Now I am writing a blog on that logic as I want to share my logic with everybody. Here is my code:- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using S...
Today one of my colleague asked me a simple question that how I can generate set of 10 unique random numbers. First I thought it is very simple but later I found it’s very logical. So I thought I should write a blog on this. Here is my code - using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class RandomNumber : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Genrat...
Web Service – Web Service is a huge thing in ASP.NET. Using web Service, We can create robust web applications. We can create Web service’s methods and that function can be accessible to the rest of the world. ASP.NET provides easy way to develop Web services. With the help of Web services we can share data across different platforms. In this blog I will explain only how to insert data in database using Web Service. Here is more info about Web service . This is my aspx code – <html xmlns="htt...
In this blog I will explain how to find control in nested Data list. I will also tell you how you can bind nested Data list. In below code there is a class file (DummyData.cs) and a page (NestedDatalist.aspx). Here is my code:- NestedDatalist.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="NestedDatalist.aspx.cs" Inherits="NestedDatalist" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html ...
In this blog I will explain how to upload some particular file upload in ASP.NET. In below code there is a fileupload (fuTest) and a button (btnUpload) control. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td><asp:FileUpload ID="fuTest" runat="server" /> <%--with the below RegularExpressionValidator user can upload onl...
In this blog I will tell how many Data types in C#. There are following Data types built into C# and each one stores a different kind of data. Note: whole number – its means it doesn’t have a decimal point. Data Type Description Bits int int can store any whole Number from -2,147,483,648 to 2,147,483,647 32 bits string String can hold text of any length bool bool is a Boolean value it’s either true or false 8 bits float float can store any decimal numbers 32 bits byte byte can store any whole nu...
In this blog I will explain how to prevent duplicate value in a table. I have a Student form. In this form user can insert student’s details. But duplicate value in Roll No field isn’t allowed. In below example I show you how you can stop duplicate value in a field. Here is my code:- In this StoredProcedure I am checking Roll no, if it is already exist then it won’t save in database. CREATE PROCEDURE [Test_Insert] @StudentID INT OUTPUT, @StudentName NVARCHAR(100), @RollNo INT, @FatherName NVARCH...
In this blog I will explain how to write a text file in ASP.NET. Here is my code:- There is a Textbox and one button. You can type your name in textbox and it will write into your text file. You can check your text file in D drive (D:\). ASPX Code:- <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td>Enter Your Name: </td> &l...
Last week I have checked a website. In that website I saw my name and when I clicked on my name, it changed into a textbox and asks me update for my name. I found it very good. Today I have created a new dummy project on this functionality. Here is my Code:- <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> &...
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: