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

UpdatePanel Trigger - DefaultButton in ASCX Problem...

Hi all,

I have a user control (ASCX). In that user control there is a panel, and inside that panel there is a textbox and a button. The panel has a DefaultButton property set, which is set to the button inside it.

I also have a page, and on that page there are two instances of that user control (uc1 and uc2). I additionaly have an update panel on the page. In that update panel there is a label. This update panel has two async triggers defined, one for uc1 and the other one for uc2.

What I want is simple. When I am in the textbox of uc1, type something and press enter (not clicking the button), I want the label to display the entered text. Also when I am entering text in the textbox of uc2 and press enter, the label should display the text of the textboxin uc2.

So far so good, it is working in IE7. But I want this also to work in Firefox 2. In firefox, when I am in the textbox and press enter, nothing happens. If I remove the trigger of the update panel, it is working. Also, when I put the control directly on the page (without putting them in a user control), it is working too.

I thought it is maybe not working because I have not defined the eventName of the trigger. So I have written an event for the usercontrol and raised that event in the user control ButtonClick event, and in the trigger I set EventName to that event, but it also doesn't worked in firefox.

So I think this is a bug of the Update Panels Triggers. Please let me know, if I am doing something wrong.

Thanks for help...
Aug 14 '07 #1
1 3882
nateraaaa
663 Expert 512MB
Hi all,

I have a user control (ASCX). In that user control there is a panel, and inside that panel there is a textbox and a button. The panel has a DefaultButton property set, which is set to the button inside it.

I also have a page, and on that page there are two instances of that user control (uc1 and uc2). I additionaly have an update panel on the page. In that update panel there is a label. This update panel has two async triggers defined, one for uc1 and the other one for uc2.

What I want is simple. When I am in the textbox of uc1, type something and press enter (not clicking the button), I want the label to display the entered text. Also when I am entering text in the textbox of uc2 and press enter, the label should display the text of the textboxin uc2.

So far so good, it is working in IE7. But I want this also to work in Firefox 2. In firefox, when I am in the textbox and press enter, nothing happens. If I remove the trigger of the update panel, it is working. Also, when I put the control directly on the page (without putting them in a user control), it is working too.

I thought it is maybe not working because I have not defined the eventName of the trigger. So I have written an event for the usercontrol and raised that event in the user control ButtonClick event, and in the trigger I set EventName to that event, but it also doesn't worked in firefox.

So I think this is a bug of the Update Panels Triggers. Please let me know, if I am doing something wrong.

Thanks for help...
This sounds like you are encountering differences between the way IE7 and Firefox 2 handles requests from the Update Panels. Try doing some research to find out the different ways that IE7 and Firefox 2 handle the update panel postback requests. A workaround for this would be for your application to check to see which browser is accessing your application then use the appropriate code path to execute your application successfully.

Nathan
Aug 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Diane Yocom | last post by:
I'm trying to use an Atlas UpdatePanel to just update a label when a text box has changed. The problem is that my textbox is in a user control and I'm using Master Pages - with the combination of...
2
by: brett | last post by:
I have an AJAX updatepanel in an aspx page. Inside the updatepanel is a placeholder control, which loads various ascx files. This all works fine. One of the ascx files also has an updatepanel in...
0
by: =?Utf-8?B?QWxleA==?= | last post by:
I have a page that contains a web user control. The user control contains an UpdatePanel. A button on the main page needs to perform some server side operations when clicked and show or hide the...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
0
by: rsdev | last post by:
Hi, I am new to implementing Asynchronous javascript in asp.net (or any framework) and have come across a problem. In a user control I have an accordion with a nested updatepanel, the trigger...
3
by: JacekDr | last post by:
Hello, I've got the following problem: I want to add and remove dynamically controls to UpdatePanel. In my user control I have a button, but when I click it I get AsyncPostback and Event for...
1
by: abellix | last post by:
An updatepanel contains a datagrid, this datagrid has columns generated by code-behind: some columns should have async postback, others should have sync postback. Here a sample to reproduce the...
5
by: Leon Mayne | last post by:
Having a bit of trouble here. I know that if you want to use a fileupload control inside an AJAX update panel then you need to create a trigger for the control that performs the uploading postback...
6
by: Mark B | last post by:
I have a function that looks up a SQL table to see if a search term matches. It works fine but so far there are two things yet to work: 1) After entering a search term and pressing Enter, nothing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...

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.