473,427 Members | 1,819 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,427 software developers and data experts.

Client script access to server side controls



Does the use of server side controls eg <asp:textbox> preclude the
access to that control by client script? If not, how do you reference
those elements?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
4 4200
In normal way, by id.

Eliyahu

"Don Parker" <sc*************@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP14.phx.gbl...


Does the use of server side controls eg <asp:textbox> preclude the
access to that control by client script? If not, how do you reference
those elements?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2
Don,
You can access serverside controls via client script using the usual
methods, in most cases. For example, if your server side control name
is "txtProductName", then you can access the control in Javascript
using document.getElementById("txtProductName"). When using the
SmartNavigation feature, certain types of client script may not work
properly.
Jason

Nov 19 '05 #3
If you place your textbox control inside any databound control like
repeater, datalist or datagrid. Then name and id of the textbox control will
be changed with respect to container element. Hence to access the textbox
control in client side, you need to use its clientid property(serverside
property) to get the id of the control to access it in client side.

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Don Parker" <sc*************@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP14.phx.gbl...


Does the use of server side controls eg <asp:textbox> preclude the
access to that control by client script? If not, how do you reference
those elements?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #4

Ah hah. I was trying to set the text property of the control. Since
that would not work and you guys are all telling me I should be able to
access this object - I tried using the normal value property that you
would use with ah HTML control and that works! Thanks!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Kathryn | last post by:
Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve is this - - Page loads up and some server side...
6
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. ...
3
by: Earl Teigrob | last post by:
I wanted my "Terms and Conditions" Checkbox control to participate in my ASP.NET validation just like all the the other controls on the page. After some time of searching the web for an example of...
5
by: Mong | last post by:
Hi, I have a webform with various asp controls on it such as textboxes and dropdownlists. I'm fairly new to asp.net coming from VB6 and am wondering when it's best to use client side events and...
1
by: Hong Hao | last post by:
Recently, I was trying to modify an existing aspx page when client-side validation on that page stopped working. I searched this group and the web in general and found that other people have had...
5
by: John A Grandy | last post by:
is it possible to write a vb.net code (intended to run on the client-side) that would invoke an instance of IE, have it download a page from a certain URL, and then pre-populate some of the...
9
by: CGW | last post by:
I asked the question yesterday, but know better how to ask it, today: I'm trying to use the File.Copy method to copy a file from a client to server (.Net web app under IIS ). It looks to me that...
10
by: Ben | last post by:
Hi, I made an application in classic asp (reservation of books and video stuffs for students) and want to migrate to asp.net. The user has to chose a date, then pushung on a submit button. The...
5
by: Alex Maghen | last post by:
I frequently find myself wanting to insert some basic client-side JavaScript functions in the page of an ASPX of mine. But I find it so frustrating that I have to actually contruct my JavaScript in...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.