473,379 Members | 1,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

how to clear values asp.net controls using java script

Hi All,

Here I need help to all of u, I am using ASP.NET 2.0 and Third party Infragistic Controls. I Have included master page in my page (<%@ Page Language="VB" MasterPageFile="~/ServiceReferrals/HCSOS.master" AutoEventWireup="false" CodeFile="HCSOSDetails.aspx.vb" Inherits="HomeCareSOS" %>) then Inculding my js files like
<asp:Content ID="HCSoS" ContentPlaceHolderID="HCSOSDetails" runat="server">
<script type="text/javascript" src="../JSUtils/GridUtils.js"></script>
<script type="text/javascript" src="../JSUtils/StringUtils.js"></script>
<script type="text/javascript" src="../JSUtils/PageCommon.js"></script>
<script type="text/javascript" src="Includes/HCSOSDetails.js"></script>
here master page provide ContentPlaceHolder <asp:Content ID="HCSoS" ContentPlaceHolderID="HCSOSDetails" runat="server"> to add my page contents
after that I have taken asp.net2.0 text boxes and other controls within a asp pannel.
When I clear these controls value with java script then this produce object not found error
I am using following code
UI source code ----
<asp:Content ID="HCSoS" ContentPlaceHolderID="HCSOSDetails" runat="server">
<script type="text/javascript" src="../JSUtils/GridUtils.js"></script>
<script type="text/javascript" src="../JSUtils/StringUtils.js"></script>
<script type="text/javascript" src="../JSUtils/PageCommon.js"></script>
<script type="text/javascript" src="Includes/HCSOSDetails.js"></script>
<table class="fullWidth">
<tr>
<td colspan="6" valign="top">
<igmisc:WebGroupBox ID="wgbRecordDetails" runat="server" Text="Record Details"
Width="99%">
<Template>
<table border="0" cellpadding="1" cellspacing="1" class="fullWidth">
<tr>
<td style="width: 5%; white-space: nowrap">
<asp:Label ID="lblClientId" runat="server" Text="Client Id:"></asp:Label></td>
<td style="width: 13%">
<asp:TextBox ID="txtClientId" runat="server" ReadOnly="True" SkinID="DisplayOnlyTextbox"
Width="56px"></asp:TextBox>
</td>
<td style="width: 5%; white-space: nowrap">
<asp:Label ID="lblClientName" runat="server" Text="Client Name:"></asp:Label></td>
<td style="width: 20%">
<asp:TextBox ID="txtClientName" runat="server" ReadOnly="True" SkinID="DisplayOnlyTextbox"></asp:TextBox>
</td>
<td style="width: 3%; white-space: nowrap">
<asp:Label ID="lblSPId" runat="server" Text="Service Placement Id:"></asp:Label></td>
<td style="width: 17%">
<asp:TextBox ID="txtSPId" runat="server" ReadOnly="True" SkinID="DisplayOnlyTextbox"
Width="56px"></asp:TextBox>
</td>
<td style="width: 5%; white-space: nowrap">
<asp:Label ID="lblReferralID" runat="server" Text="Referral ID:"></asp:Label></td>
<td style="width: 15%">
<asp:TextBox ID="txtReferralID" runat="server" ReadOnly="True" SkinID="DisplayOnlyTextbox"
Width="72px"></asp:TextBox></td>
</tr>
<tr style="display: none">
<td style="width: 5%; white-space: nowrap">
</td>
<td style="width: 13%">
</td>
<td style="width: 5%; white-space: nowrap">
</td>
<td style="width: 20%">
</td>
<td style="width: 3%; white-space: nowrap">
</td>
<td style="width: 17%">
</td>
<td style="width: 5%; white-space: nowrap">
</td>
<td style="width: 15%">
</td>
</tr>
</table>
</Template>
</igmisc:WebGroupBox>
</td>
</tr>
</table>

function ClearScreen()
{
//alert("Anil Test")
var d = document.all;
var e = "";
d.txtClientId.value= e;

}


btnCancel.Attributes.Add("onClick", "ClearScreen();return false;")


Please provide help on this. how to resolve




Thanks




Anil Kumar Dwivedi
Jul 27 '07 #1
1 2648
kenobewan
4,871 Expert 4TB
I don't see btnCancel in your page?
Jul 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the...
3
by: sushi | last post by:
Hello, I am developing an asp.net website. In this I am using a web form say' Web form1.aspx' which has two button controls say 'button1' and 'button2'. When I am click 'button1' it displays a...
2
by: Pipo | last post by:
Nobody knows how to get the values provided in the client can be read in the user-control? If have made a Web Custom Control with 2 textboxes and 1 dropdownlist. The user fills in my control (the...
5
by: BLACKDOG157 | last post by:
I've made a form with a variable number of textboxes. The user fills them out, and then I need to pick up the values he has filled in. The number of textboxes vary depending on a value that the...
1
by: jason.tadeo | last post by:
I am very new to java script and I am trying to be able to have two select boxes. One that has states and one that has cities. On the change or pick of the state then the cities in my data base are...
3
by: Tenacious | last post by:
I find that I can call a function in my code behind file from Java Script on the aspx page using this syntax: Lat = <%= GetNextLatitude()%> The function has to be static. No problem so far. When...
1
by: anilkumar1980 | last post by:
Hi All, Here I need help to all of u, I am using ASP.NET 2.0 . I Have included master page in my page (<%@ Page Language="VB" MasterPageFile="~/ServiceReferrals/HCSOS.master"...
1
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
1
by: adarshyam | last post by:
can anybody tel me how to clear values from dynamically created text boxes?? using a clear button.. this is the code used to create dynamic text boxes.. if i press clear button then it must clear all...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.