473,569 Members | 3,009 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.GetEle mentId("MyContr ol_textbox").va lue

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 1697
"olivier" <no****@free.fr wrote in message
news:ea******** ******@TK2MSFTN GP03.phx.gbl...
document.GetEle mentId("MyContr ol_textbox").va lue
document.GetEle mentId('<%=MyCo ntrol_textbox.C lientID%>').val ue;
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.GetEle mentId('<%=Page .Findcontrol("M yTextBox").Clie ntID%>').value;

What do you think ?

Olivier
"Mark Rae" <ma**@markNOSPA Mrae.coma écrit dans le message de news: %2************* ***@TK2MSFTNGP0 3.phx.gbl...
"olivier" <no****@free.fr wrote in message
news:ea******** ******@TK2MSFTN GP03.phx.gbl...
document.GetEle mentId("MyContr ol_textbox").va lue
document.GetEle mentId('<%=MyCo ntrol_textbox.C lientID%>').val ue;
ps : excuse me for my poor english.
Pas de quoi...:-)

Jan 31 '07 #3
"olivier" <no****@free.fr wrote in message
news:%2******** **********@TK2M SFTNGP05.phx.gb l...
>But it's more portable if i write

document.GetEl ementId('<%=Pag e.Findcontrol(" MyTextBox").Cli entID%>').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
1757
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 data back and forth between my page and the server via AJAX. In terms of .net, can someone give me the overall concept? Normally, I'd have a...
1
1837
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 filter changes you want the gridview to change but nothing else. In particular all you would like to happen is for an ajax call to occur and a new...
1
2458
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 website. I've created an AJAX based user control, which is dynamically placed on a page (once, or multiple times) if the user has the correct...
2
2199
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 the form load event. Why should it fire when I put a button in a update panel? Is this necessary and is only the other controls related to the...
0
1447
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 batch detail record to the same batch master. The user enters the detail record, saves, and then the page reloads to allow the user to enter the...
9
9724
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. I read some articles that Ajax is not compatible with fileupload. I want to know the solution or workaround for this. Thanks
10
2112
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 Master pages as their master...) the entire page is refreshed - also the menu which belongs to the master, how can I fix it - so only the inside...
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 possible. I saw the posiibilty of the Ajax control toolkit with the calendar extender. How nice. But is it fast? Thats the question, because the...
1
2918
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 functionality into a user control, providing events for when ok and cancel is pressed so that the caller (in this case a page with the control on it) can then...
6
2629
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 in the page and I've got code to get the selected value from it in the Radiobuttonlist_SelectedIndexChanged event. The code in there is: ...
0
7703
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, 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...
0
7619
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
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 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...
0
6290
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
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...
1
2118
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
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.