473,770 Members | 6,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UI not updating in calling page

Hi,
I am launching a modal dialog through the usual javascript
(window.showmod aldialog). When the modal dialog is complete (ie user
selects OK), the calling page then refreshes itself by setting the
location.href of the window to be itself (ie the modal dialog changes a
label on the calling page ). I can see that this causes the page load
code of the calling page to execute in the code behind page. I can also
see clearly that this updates the value of a label on the calling page
but unfortuately, the label in the UI of the calling page is not
updated when I view the form after its finished reloading.
Does anyone know how, when the correct code behind code executes and
updates the label but ASPDotNet doesn't relfect the label change in the
UI ?

thanks for any badly needed help!
Des.

Nov 19 '05 #1
1 1945
I think what is happening here is that the ViewState value for the control is
overwriting the value placed in the label by your Javascript.

Try using a server-side HTML Hidden element instead of the label; during the
Page Load / Postback event you can populate the label from the Hidden
element. That way the value in the label will persist across postbacks.

You might also want to try using the Form.Submit method to cause the
postback from Javascript, though it sounds like your method works fine.

--
Paul Taylor
Dotcom Software Solutions
www.dotcomsoftwaresolutions.co.uk
"de****@gmail.c om" wrote:
Hi,
I am launching a modal dialog through the usual javascript
(window.showmod aldialog). When the modal dialog is complete (ie user
selects OK), the calling page then refreshes itself by setting the
location.href of the window to be itself (ie the modal dialog changes a
label on the calling page ). I can see that this causes the page load
code of the calling page to execute in the code behind page. I can also
see clearly that this updates the value of a label on the calling page
but unfortuately, the label in the UI of the calling page is not
updated when I view the form after its finished reloading.
Does anyone know how, when the correct code behind code executes and
updates the label but ASPDotNet doesn't relfect the label change in the
UI ?

thanks for any badly needed help!
Des.

Nov 19 '05 #2

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

Similar topics

10
8444
by: Curious | last post by:
Hi, I have a thread running, and at a point in this thread I am calling a method to update GUI controls. From the net I have read that updating GUI controls from the worker thread is bad practice. Thread myThread = new Thread(new ThreadStart(Worker));... myThread.Start();
8
3017
by: TC | last post by:
Hello, I am making an asynchronous call to a webservice and trying to update the web page with the results. The page is not updating. Does anybody know why??? Below is my code:
0
912
by: Dave Dodd | last post by:
Hi All, I am new to dotnet and so far I am really enjoy using it. I am trying to figure out if the dataset is supposed to be updated when IsPostBack is true. For instance, I have a page with some TextBox controls that are bound to a dataset columns. I make a modification to one of the TextBox's and click a button.
9
5836
by: Jervin Justin | last post by:
Hi, I've been having this problem for some time with Web Forms: I have a web app that sends data to a service when the user presses a button. Based on the data, the server will send several replies. Since there is no way for a service to post to a client, I am using a thread on the client that polls the server for updates. (Feel free to recommend changes to that as well)
10
5823
by: sqlboy2000 | last post by:
Hello all, I have something very simple going on here and I'm scratching my head as to what the problem is. There are 4 items in my project, 2 webforms, a user control, and a module: WebForm1.aspx ChangeValue.aspx WebUserControl1.ascx Module1.vb
0
927
by: clarkeyboy | last post by:
I have built an aspx page that allows the user to change the sortOrdinal using CmsApplicationContext. It all works fine ecept that after I commitAll I call my sitemap building function again so that the user can view the new menu order. The page does not show the new order (or SortOrdinal) until I refresh the page. If I put a response.redirect("navigation.aspx") in instead of calling the navs() function it does show the new order. Though...
22
3154
by: Tim | last post by:
Hi A while ago I got some help in writing a mock console. The idea was to write a VB app that contained a textbox, then run a process from within the app and redirect the stdout to the textbox. My problem was that textboxes have maximum length limits, so I had to write a function to erase some of the text when it started getting full. That appears to work, but I am experiencing odd behaviour when the textbox text gets long. When it got to...
10
5682
by: jaYPee | last post by:
does anyone experienced slowness when updating a dataset using AcceptChanges? when calling this code it takes many seconds to update the database SqlDataAdapter1.Update(DsStudentCourse1) DsStudentCourse1.AcceptChanges() i'm also wondering because w/ out AcceptChanges the data is still save into the database and it is now faster.
2
4705
by: archana | last post by:
Hi all, I am having application wherein i am using asynchronous programming and using callback i am updating one label control. My question is can i use lock statment to lock control. If yes which one is better to prevent unpredictable update of label. Whether should i use lock statement or control.invoke and give method name. Please correct me if i am wrong.
0
9425
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
10228
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
10057
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
9869
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...
0
8883
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6676
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
5312
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
3970
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
3
2816
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 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...

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.