Wednesday 22 May 2013

Widgets

Disable Autofilling in all browser on Web Page Text Box

Demo:-


Instruction:- In This we use Autocomplete Property.

autocomplete="off" 

Design Code:-


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Disable Autofilling in all browser on Web Page Text Box</title>
<style type="text/css">
.Button
{
background-color :#0066CC;
color: #FFFFFF;
font-weight: bold;
margin-right: 2px;
padding: 4px 20px 4px 21px;
}
</style>
</head>
<body>
<form id="form1" runat="server" autocomplete="off">
<fieldset style="height: 242px; width: 470px">
<legend>Contact Us</legend>
<table cellspacing="2" cellpadding="2" border="0">


<tr><td>Name:-</td><td><asp:TextBox ID="txtName" runat="server" /></td></tr>


<tr><td>Email:-</td><td><asp:TextBox ID="txtEmail" runat="server" /></td></tr>

<tr><td>Subject:-</td><td><asp:TextBox ID="txtSubject" runat="server" /></td></tr>

<tr><td valign="top">Query:-</td>

<td> <asp:TextBox ID="txtMessage" Rows="5" Columns="40" TextMode="MultiLine" runat="server"/></td></tr>
<tr>
<td><asp:button ID="btnSubmitt" Text="Submit"  runat="server" onclick="btn_Click" CssClass="Button"/></td></tr>
<tr><td colspan="2" style=" color:red"><asp:Label ID="lbltxt" runat="server"/></td></tr>
</table>
</fieldset>
</form>
</body>
</html>

0 comments:

Post a Comment