ASP.NET 4 UpdatePanel breaking change - updatepanel

I am porting an ASP.NET application from 3.5SP1 to 4.0. The application works perfectly in 3.5SP1. In 4.0, I am seeing a difference in UpdatePanel behavior.
We have a simple user control with a testbox, a button, and some text. The user control lives inside an UpdatePanel with UpdateMode="Conditional" and ChildAsTriggers="true".
Users type into the textbox and click the button. We do a search. If we find something, content elsewhere on the page is updated - this works great. If we don't find it, we change the text in the user control. That change never appears.
So I know the button and logic is working. The user control does not own the UpdatePanel it lives in, and it would be nice if it didn't have to. But even though the button is raising an event back to the server, the update panel content is not updating.
Has anyone seen this?

My problem turned out to be 4.0's new client-ID mechanism. Check out the new features here.
4.0 defaults to 'Inherit' while 'autoID' is the 'old' behavior. By adding this to the web.config pages element:
clientIDMode="AutoID"
my problem went away. I'm not wild about forcing backward-compatible behavior but until I can sort thru all the control relationhips this will have to do.

Related

Ms Access pop-up forms off screen

I am currently working in MS access 2013, and having an issue with some forms that worked previously. I have gone back and edited them to have different functionality. I need the forms to be pop ups. Now, they work perfectly when they aren't pop-ups, but as soon as I change the forms to pop-ups the forms pop up off screen. I have no clue how to fix this.
Now the first thing I did was start from an old verison, and I was just going to remake the form; however, as soon as I change ONE thing from those old forms the form starts popping up off screen again.
Has anyone had this issue or know how to resolve it?
If you have two monitors or if your application is created in a secondary monitor and used in a single monitor machine, this behavior is expected. As EvDev mentioned. Set the "auto center" = Yes and edit your application in the default monitor.
Set the Auto Center property of the form to True.

Microsoft Access form opens minimised after its been changed

Im having an intermittent problem where forms open in view mode but minimised, looking like a small inch-sized box with the 'X' close button visible.
It normally seems to happen when Ive made a change to the form or code in the forms module, but happens randomly when being used in view mode.
I can only get round it by either re-importing a backup of the form or making the form border sizeable, either way it's not too professional.
Any ideas how I can solve this one?
Docmd.Restore seems to work on the form load event

Auto suggest with Rendering issue

I have an issue in our currently running .net application. we are using autocomplete extender control associated with city textbox for city selection. Due to slow internet connection, when user uses this application with partially rendered, it is not suggesting for entered city (highlighted in red).
I have used Page_Init event for first disable the textbox, than enable it on Page_Load, but it's not working (to prevent user for enter text when the page is not loaded completely).
Is there any solution to overcome this problem?
After loaded successfully,
So you want to disable the textboxes until the page has loaded? I am not sure if it will work like you want but have you considered using jQuery to disable the textbox? For example here, here, here

Primefaces - using dialogs and layouts

I have a (JSF 2.0/ Primefaces 2.2RC-SNAPSHOT) app that has
<p:layout>
I use a lot of dialog in my application and before the newest version of primefaces came out there was no way to display a dialog with a modal on top of the layout without putting the dialogs outside of the tags.
So I did just that. The issue I am having now is I am noticing that constructors and postcontructs are being called when my application is loaded. This is because the view with the layout is being loaded and therefore all my dialogs are being loaded.
I don't want these constructors being called until I am actually dealing with the appropriate views in my application.
I have been testing the appendToBody attribute on the
<p:dialog>
tag but it seems really buggy. Everything works fine on the initial rendering of a view. I can open a dialog close it etc and it works fine. If I navigate away to another view and then come back to the initial view and open the dialog, everything is running off the page. The dialog window is in the correct place but the content is not.
My question is 1. Is there a way I can have the dialog windows outside of my layout as a child of the
<h:body>
without having all the managed bean constructors associated with them initiated when the application loads?
Or does anyone know how to fix the alignment issue when using the appendToBody tag? Thanks.
When using layout and dialog, I usually place my dialogs outside of the layout as a direct child of the body element. I have a special ui:insert part in my page template for this.
appendToBody was added to make this easier, if it doesn't work well for you, give this approach a try. I know modal dialogs and layout can work this way.
without having all the managed bean constructors associated with them
initiated when the application loads
Maybe the managedbean gets loaded when your dialog is rendered.
Try rendering the dialog only after the button click, perhaps byputting rendered="#{mybean.flagLoadMyDialog}" on the dialog, and set the flagLoadMyDialog when the button is clicked using ajax.
Also remember to ajax-update the dialog after the button click.

Block Access mousewheel behavior in external ActiveX controls

In an Access (2002 / 2003) data-bound form, a turn of the mousewheel moves to the next/previous record, even if the cursor is inside a multiline text field or a listbox. This is a major annoyance to users and cannot be turned off easily.
I recently discovered a DLL called MouseHook (http://www.lebans.com/mousewheelonoff.htm) which can effectively block this mousewheel behavior and replace it with more expected behavior.
However, when an external ActiveX control is added to an Access form, this module does nothing. For example, I have a form with a FlexGrid control on it, and it can contain a lot of rows. When a user tries to scroll in there using the mousewheel, Access again simply goes to another record instead, even with MouseHook DLL loaded.
Is there a solution like MouseHook DLL but which also works for external ActiveX controls? Or is the source code of the MouseHook DLL available so it can be modified to deal with controls like FlexGrid?
PS: I wanted to ask the author of MouseHook DLL, but he is currently "on a hiatus" until June 2009.
If you really have to alter the UI and change how the user expects the mouse wheel to work, I would actually recommend just disabling it rather than altering how it scrolls. While it's scrolling may seem odd to you, it is how the program works. What would you do if you had to read PDF's all day, and then one day one person decided that the way the mouse wheel scrolling worked wasn't good enough and changed to so it defaulted to huge jumps or horizontal or whatever. Yes, it may have been a better solution, however it is annoying to the user because it doesn't do what it is supposed to do.
Why are you using a flexgrid in Access? To me, this is a read flag that you likely are approaching the project with an Access-hostile point of view, since you seem to be choosing non-native controls to do things that are almost always much more easily accomplished with Access's native controls.
Hook the flexgrid, intercept the WM_MOUSEWHEEL message, ignore it and call your intended behaviour.
Not a direct answer to your question, but the way we deal with the mouse wheel movement is to prevent accidental changes of records after the user has started editing. When the user opens the form, the wheel moves the records willy-nilly as normal. As soon the user edits something on the field, and then moves the mouse wheel, the BeforeUpdate event fires, which causes our code to put up a prompt saying they must save the record first. We have a save button which the user must explicitly press to supress the warning in the BeforeUpdate event.