473,507 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ajax and asp.net in user control

Hi,

I want to use javascript (ajax) in User Control but to call
the object is difficult.

If my user control is called MyControl.
To use the object in javascript, i make,

Ex:
document.GetElementId("MyControl_textbox").value

Have you an idea to get the name of the user control asp.net
to instance my code javascript cause the same code javascript must to work
in other User control.

Thank's
Olivier
ps : excuse me for my poor english.

Jan 31 '07 #1
3 1691
"olivier" <no****@free.frwrote in message
news:ea**************@TK2MSFTNGP03.phx.gbl...
document.GetElementId("MyControl_textbox").value
document.GetElementId('<%=MyControl_textbox.Client ID%>').value;
ps : excuse me for my poor english.
Pas de quoi...:-)
Jan 31 '07 #2
Thank's

I had not thought of it

But it's more portable if i write

document.GetElementId('<%=Page.Findcontrol("MyText Box").ClientID%>').value;

What do you think ?

Olivier
"Mark Rae" <ma**@markNOSPAMrae.coma écrit dans le message de news: %2****************@TK2MSFTNGP03.phx.gbl...
"olivier" <no****@free.frwrote in message
news:ea**************@TK2MSFTNGP03.phx.gbl...
document.GetElementId("MyControl_textbox").value
document.GetElementId('<%=MyControl_textbox.Client ID%>').value;
ps : excuse me for my poor english.
Pas de quoi...:-)

Jan 31 '07 #3
"olivier" <no****@free.frwrote in message
news:%2******************@TK2MSFTNGP05.phx.gbl...
>But it's more portable if i write

document.GetElementId('<%=Page.Findcontrol("MyTex tBox").ClientID%>').value;

What do you think ?
I don't think it will make much difference...

However, something that I missed in my previous reply and which I've just
spotted now is that it's getElementById, not getElementId
Jan 31 '07 #4

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

Similar topics

5
1753
by: darrel | last post by:
I've been playing with prototype.js and scriptaculous to create some nice drag-and-drop interaction on my applications GUI. That's working well. Now I want to take the next step and start passing...
1
1834
by: codefragment | last post by:
Hi I have asked this on the official asp.net forums but no luck so thought I'd try here Assume you have a page with a filter control and a grid view and many other controls on it. When the...
1
2453
by: AndiSmith | last post by:
Hi guys, I wondered if anyone could help me with this problem, or even shed some light on the direction I need to take to resolve it? I'm using .NET 2.0 (C# flavor) to build a large user-based...
2
2193
by: =?Utf-8?B?VG9u?= | last post by:
Hello, I want to understand teh benefits of ajax technology. Does anyone has a good website where AJAX EXTENSIONS is worked out so I really understand it. There a 2 main questions: 1) How about...
0
1440
by: tlc | last post by:
Hi there, I'm new to the AJAX framework, and trying to find a way to do something that perhaps is not part of the AJAX framework. I have a data entry page that keeps allowing a user to enter a...
9
9716
by: vital | last post by:
Hi, I have a User control which has a fileupload control. With the requirements I placed the user control in a UpdatePanel of ASP.NET Ajax and the fileupload.postedfile.filename giving error. ...
10
2106
by: =?Utf-8?B?RGFuaQ==?= | last post by:
Hi, Trying to create a master page that holds a menu, and the menu switches between pages in the site. 2 problem arrosed: a. When I navigate from page to page (all AJAX Web Forms, with the...
4
1493
by: ton | last post by:
Hi, I wander what to do. I'm developing a webapplication. One of the parts is to show records from a database. To modifiy a value, text of relational link or date I would like to use Ajax where...
1
2914
by: Dan Bass | last post by:
I'm developing an Ajax keypad (C# / ASP.Net 3.5 / VS 2008) using the updatepanel so that a full visible postback doesn't occur with each button press. I've decided to try and wrap the...
6
2627
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
0
7221
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
7372
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...
1
7029
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...
0
7481
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
5619
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,...
1
5039
isladogs
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...
0
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
411
bsmnconsultancy
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...

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.