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! 4 4208
In normal way, by id.
Eliyahu
"Don Parker" <sc************ *@yahoo.com> wrote in message
news:uo******** ******@TK2MSFTN GP14.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!
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.getEle mentById("txtPr oductName"). When using the
SmartNavigation feature, certain types of client script may not work
properly.
Jason
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(server side
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******** ******@TK2MSFTN GP14.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!
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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 vbscript reads the database and
populates a listbox on the page with the first field from each record
in the recordset. This works fine.
- User selects an option on the listbox and, using the OnChange, I
|
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. Because I don't want a post-back,
I added some javascript to do this
However, using client-side JS, I cannot enable any controls that have been
disabled by server-side code. If the control is initially enabled, I can
disable/enable it client-side.
|
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 how to do this, I created
the script to do it and thought I would share it. Its a littel messy but
does the job. If anyone has a better solution, please let me know.
//Client Site Event Handler to put in Page_Load event...
|
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 when it's best
to use server side events.
For example, if a textbox is to contain a date I want to validate the
date when that textbox loses the focus. If the date is not valid I
make visible a label next to the textbox telling the user it's
|
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 the same issue. However,
none of the suggested fixes solved my particular problem. I tracked down the
cause of the problem, which is related to aspx page parser's handling of
controls inside html comments. The problem may be quite common and well...
| |
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 controls on that page, before
transferring focus to the browser-page and showing it to the user? (the
user would be responsible for submitting the page.)
|
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 when I
give a path like @"C:\holdfiles\myfile.txt" it looks on the server C drive.
How do I pull from the client? Do I need a different class and/or method?
Filestream?
--
Thanks,
|
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 whole day
is then displayed in cels of a table. The user has then to click in a cel
representing a hour of the day and an object (book ..), and finally click on
the submit button to insert that reservation in the database.
My problem is: there...
|
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 C# on the server-side and render
it to the client because I can't use the IDs of my controls as they are
written in the HTML page itself. Rather, I have to use Control.ClientID to
get that ID that I can use in the client-side JS.
So my...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |