473,769 Members | 2,599 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 1704
"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
1768
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 function in my codebehind that grabs a dataset and then binds that to a control on my aspx page.
1
1844
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 grid view to be returned.
1
2472
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 permissions to receive it. It contains two drop down lists - employee value and partner value; and a...
2
2213
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 update panel send back? Or the whole page (If this is true I really do not get it). But please answer...
0
1456
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 next record. However, when the user
9
9741
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
2146
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 content will be refreshed ?
4
1503
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 roundtrip to the server would build the full page in postback and only the changes will be posted...
1
2927
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 query for the keypad's final value. If I remove the UpdatePanel, the events that the caller...
6
2643
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: Protected Sub rblFMSValue_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
0
9589
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10047
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
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();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3962
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 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.