473,287 Members | 1,395 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,287 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 2638
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.