ASP.Net Code By Adil
This blog contains all ASP.Net,Javascript,SQL Server content.
October 20, 2015
June 03, 2014
How To Import Excel data to ASP.Net
Import excel data to ASP.NET
Hello Friends
In our daily life
there are various situations in which we have to show entire excel sheet
data to our ASP.Net GRIDVIEW/REPEATER
etc.
So to solve this type
of problem is very easy.
- Firstly please define the column name in excel file, so that we can compare it in our ASP.Net code to bind it in the GRIDVIEW/REPEATER.
- Suppose we have two columns in excel file (First is(A1)-->Name, Second is(B1)-->Mobile)
- So to do this firstly we create a connection for excel file.
- Then read the data from excel sheet.
- Save it in a datatable.
- Bind it to GRIDVIEW/REPEATER.
- Dispose the datatable.
- In below code i have remove duplicate mobile numbers also.
May 31, 2014
Asp.net-HTML combobox using JQuery UI
Asp.net-HTML combobox using JQuery UI
By using JQuery-UI plugin we can easily convert asp.net dropdown or html select control to combobox.In this example we will convert the asp.net dropdown (html select) as combobox which will allow the users to type and select the value from the list (similar to autocomplete extender) and clear the input if the entered value is not there in the list.
May 27, 2014
Count characters in Text box just like way2sms.com
Count characters in Text box like way2sms.com
Some time in the normal world we need to type in text box just like way2sms.com. i.e. "160" character remaining. So to do this we need to do simple below JavaScript function.
February 04, 2014
LINQ to SQL
LINQ to SQL
-
Introduction
This article demonstrates what LINQ to SQL is and how to use its basic functionality. I found this new feature amazing because it really simplifies a developer's debugging work and offers many new ways of coding applications.
December 24, 2013
Javascript Validation Part 8 ( Various Card Validations)
Validation Part 8 ( Various Card Validations)
- <html >
<head>
<title>JavaScript form validation - checking non-empty</title>
<style type="text/css">
li
{
list-style-type: none;
font-size: 16pt;
}
.mail
{
margin: auto;
padding-top: 10px;
padding-bottom: 10px;
width: 400px;
background: #D8F1F8;
border: 1px soild silver;
}
.mail h2
{
margin-left: 38px;
}
input
{
font-size: 20pt;
}
input:focus, textarea:focus
{
background-color: lightyellow;
}
input submit
{
font-size: 12pt;
}
.rq
{
color: #FF0000;
font-size: 10pt;
}
</style>
Javascript Validation Part 7 ( checking all letters and numbers)
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript form validation - checking all letters and numbers</title>
<link rel='stylesheet' href='form-style.css' type='text/css' />
</head>
<body onload='document.form1.text1.focus()'>
<div class="mail">
<h2>
Enter your Registration Number and Submit</h2>
<form name="form1" action="#">
<ul>
<li>
<input type='text' name='text1' /></li>
<li class="rq">*Enter numbers and alphabets only.</li>
<li> </li>
<li>
<head>
<meta charset="utf-8">
<title>JavaScript form validation - checking all letters and numbers</title>
<link rel='stylesheet' href='form-style.css' type='text/css' />
</head>
<body onload='document.form1.text1.focus()'>
<div class="mail">
<h2>
Enter your Registration Number and Submit</h2>
<form name="form1" action="#">
<ul>
<li>
<input type='text' name='text1' /></li>
<li class="rq">*Enter numbers and alphabets only.</li>
<li> </li>
<li>
Javascript Validation Part 6 ( checking all numbers)
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript form validation - checking all numbers</title>
<link rel='stylesheet' href='form-style.css' type='text/css' />
</head>
<body onload='document.form1.text1.focus()'>
<div class="mail">
<h2>
Input registration number and submit</h2>
<head>
<meta charset="utf-8">
<title>JavaScript form validation - checking all numbers</title>
<link rel='stylesheet' href='form-style.css' type='text/css' />
</head>
<body onload='document.form1.text1.focus()'>
<div class="mail">
<h2>
Input registration number and submit</h2>
October 28, 2013
Javascript Validation Part 5 (Registration Form Validation)
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"
runat="server">
<title>Registration Form Validation</title>
<script language="javascript" type="text/javascript">
function validate() {
var summary = "";
summary += isvalidate();
summary += isvalidateFirstname();
summary += isvalidateLocation();
if (summary != "")
{
alert(summary);
return false;
}
else {
return true;
}
}
function isvalidate() {
var uid;
var temp = document.getElementById("<%=user.ClientID
%>");
uid = temp.value;
if (uid == "") {
return ("Please
Enter UserName" + "\n");
}
else {
return "";
}
Javascript Validation Part 4 (Checking-length-restriction)
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript
form validation - checking-length-restriction</title>
<link rel='stylesheet' href='form-style.css' type='text/css' />
<style type="text/css">
li
{
list-style-type:
none;
font-size:
16pt;
}
.mail
{
margin:
auto;
padding-top:
10px;
padding-bottom:
10px;
width:
400px;
background:
#D8F1F8;
border:
1px soild silver;
}
.mail
h2
{
margin-left:
38px;
}
input
{
font-size:
20pt;
}
input:focus,
textarea:focus
{
background-color:
lightyellow;
}
input
submit
{
font-size:
12pt;
}
.rq
{
color:
#FF0000;
font-size:
10pt;
}
</style>
Javascript Validation Part 3 (Checking non-empty Text)
<html lang="en">
<head>
<title>JavaScript
form validation - checking non-empty</title>
<style type="text/css">
li
{
list-style-type:
none;
font-size:
16pt;
}
.mail
{
margin:
auto;
padding-top:
10px;
padding-bottom:
10px;
width:
400px;
background:
#D8F1F8;
border:
1px soild silver;
}
.mail
h2
{
margin-left:
38px;
}
input
{
font-size:
20pt;
}
input:focus,
textarea:focus
{
background-color:
lightyellow;
}
input
submit
{
font-size:
12pt;
}
.rq
{
color:
#FF0000;
font-size:
10pt;
}
</style>
Subscribe to:
Posts (Atom)