.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Please Help Me For -Enter Valued on Texboxes not Seen On View Source

Posted By: Cheta     Posted Date: October 14, 2011    Points:5   Category :ASP.Net
Hi,

I have a requriment,the vaues which is enter in texbox must be encriped/hide on view source...

Thanks In Advance



Responses
Author: Cheta             
Posted Date: October 14, 2011     Points: 20   

<script type="text/javascript">
function doClick2(objRad3){
if (objRad3.value=="0"){
document.getElementById("textbox3").style.display='none'; //hide textbox
document.getElementById("otherOpt3").style.display='block'; //show other options
document.getElementById('CrimeDetails').value = 'N/A'; //this will be the default value upon dumping.
}
else{
document.getElementById("otherOpt3").style.display='none'; //hide other options
document.getElementById("textbox3").style.display='block'; //show textbox
document.getElementById('CrimeDetails').value = 'Please give details.';
}
}
</script

Author: Cheta             
Posted Date: October 14, 2011     Points: 20   

<%@ 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 runat="server">
<title>Untitled Page</title>

Insert this script in your
<script type="text/javascript">
function doClick2(objRad3){
if (objRad3.value=="0"){
document.getElementById("textbox3").style.display='none'; //hide textbox
document.getElementById("otherOpt3").style.display='block'; //show other options
document.getElementById('CrimeDetails').value = 'N/A'; //this will be the default value upon dumping.
}
else{
document.getElementById("otherOpt3").style.display='none'; //hide other options
document.getElementById("textbox3").style.display='block'; //show textbox
document.getElementById('CrimeDetails').value = 'Please give details.';
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="login" onclick="Button1_Click" />
</div>
</form>
</body>
</html>


Author: Cheta             
Posted Date: October 14, 2011     Points: 20   

http://www.dotnetspark.com/Forum/DetailForumMessage.aspx?id=3025

Author: Cheta             
Posted Date: October 14, 2011     Points: 20   

http://kevernsolutions.blogspot.com/2011/03/show-and-hide-text-box-in-javascript.html



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend