Buttons dissapear in multiview (only in .net browser) - asp.net

I have a page with a multiview containing 4 views.
I have no issues using this page with normal web browsers, but whenever I use the .net webbrowser control within a windows forms application the following happens:
View(0) loads perfectly with all controls
when I populated the fields and hit the submit button, view(1) loads.
In view(1) there is a datagrid, header and another submit button.
Everything but the submit button is visible on the screen for some reason.
Sometimes when I then use my cursor to randomly select sections of the webpage, the button suddenly appears.
To clarify: The button should be visible at all times, but isn't.
How can I fix this issue?

Figured it out.
.net web browser does not like
"position: relative"
in the css.

Related

In ASP.Net form - why is content disappearing on hover of radio button?

I have this form, that works fine in most browsers, however in Internet Explorer 11, when I first load the page and hover over any radio button all content after the radio button control disappears. The content is still there (when I look at it using F12) but not displaying. It's a standard ASP.Net radio button control. Once I click on one of the radio buttons the problem goes away and the content reappears. The problem does not occur when I'm testing/debugging locally. It only happens once the application is published to the server.
Maureen
This is likely due to your IE Compatibility View settings.
Go to Tools --> Compatibility View Settings and change it there.
I got it. My markup wasn't perfect. Just fixing a div that was out of place fixed it.

Firefox not displaying panel on refresh or postback

I have a curious issue. I have an ASP.NET web page that has a RadioButtonList with three RadioButtons. RadioButton1 hides both Panels. RadioButton2 displays Panel1 and hides Panel2 then RadioButton3 hides Panel1 and displays Panel2. Pretty straight forward. All of the logic that hide and display the Panels is in C# in the Code Behind. All of this works great in Chrome and IE. In Firefox; however, if you refresh the page in any way (another controls posts back or by hitting the browser's refresh button) while say RadioButton2 is selected and Panel1 is displayed the page comes back with the RadioButton2 still selected but both Panels are now hidden. In Chrome and IE a refresh of the page brings it back to it's original state. Meaning that all of the controls are set to their original values and RadioButton1 is selected and both Panels are hidden. Not necessarily ideal but a whole lot better than having the RadioButtons and Panels come back out of sync.
Not sure where to begin looking on this one. None of this is done in JavaScript. The panels and RadioButtons are not generated in code behind they are in the static HTML portion of the page.
Thoughts?
This sounds like you might be dealing with a page caching issue in Firefox. Have you tried disabling page caching for this page? For example, see this answer: Disable caching in Fire Fox in ASP.NET and C#
This is not really the answer I was hoping for because it seems incomprehensible to me that in 2014 we still have issues with browser inconsistencies but I put some code in the page to handle this and force it back into the proper state. This has solved the immediate problem.

JQueryMobile dialog shows twice because of a postback

I have an asp.net page with a timer embedded in an UpdatePanel (UpdateMode="Conditional", ChildrenAsTriggers="false"). The timer is responsible for updating some components of that page every few seconds.
There are also some HyperLink controls on the page and they open a JQueryMobile dialog when clicked (data-rel="dialog"). The problem is that the timer i mentioned causes postback every few seconds. So when a dialog is opened and then closed, the first such postback after then causes the dialog to open once again.
Using the rel="external" as another attribute of the HyperLinks I mentioned solves the problem, but this is no solution for me. This causes full redirection to the dialog page instead of showing it using AJAX (as if on top of current page).
My idea was to stop the timer when any hyperlink is clicked. This solves the problem, but I have no idea how to start the timer again when the dialog closes. Is it possible to detect when a JQueryMobile dialog is closed? I know, this sounds stupid, but I can't come up with a better idea. Will you help me, please?
So basically, I don't want the JQueryMobile dialog page to show up for the second time after a timer tick. Could you please advise me how to achieve that?
jQuery Mobile with asp.net Web Forms and an UpdatePannel? This just sounds like a horrible combination.
jQuery Mobile and Web Forms fundamentally don't work well together. The specific issue that Web Forms requires a single <form /> element that wraps all controls (and most content). jQuery Mobile attempts to build up the DOM with "virtual" pages via ajax loading. This breaks the PostBack model by submitting the entire form instead of the individual form found within each page template. Now throw UpdatePanels in there...
Your only hope is go exclusively with Single page templates and to disable all ajax loading data-ajax="false" on both links and forms. And just say no to UpdatePanels.
asp.net MVC would give you much greater control over these issues.

ModalPopupExtender click through on Droid Bionic

I use the modalpopupextender through out my application for adding records to gridviews. Recently I started testing it on my Droid Bionic and if I have for example a textbox inside the modal window and there are links underneath said textbox it will "click" the link instead of setting focus on the textbox. No events are fired when the link is clicked, but it does prevent me from selecting the control.
After fighting with the CSS for a while I decided to just remove all modal windows from the application and put them their own pages, but before i go through the trouble of doing that I was hoping someone else had run into this problem, and fixed it.

DropdownList losing items on postback in iframe

Having a very strange issue regarding postback in ASP.NET. I have page dynamically populating DropdownLists on Page_Load, only if it's not a postback. I also have several textboxes on the page for user input.
If I postback, either by clicking a submit button or via a SelectedIndexChanged event, the textboxes maintain their values, but the DropdownLists lose all their items - but only IF the page is loaded via an iFrame. If I load the page directly, everything works fine. If I load it via an iFrame, everything but the dropdowns works.
Has anyone run into this behavior before? I don't think it matters, but I'm on Windows7, IIS7, ASP.NET 3.5 and browing with IE8. ViewState is enabled, which is apparent from the textboxes having their values persisted. The ASP.NET page is in a WebApp hosted on localhost. The containing page, with the IFrame tag is just a dummy HTML file sitting on my desktop for testing. Is this perhaps just an IE security issue?
UPDATE:
I actually just moved the "dummy" container page into the Webapp and it seems to work fine, even via the iFrame. Still, I'd like to know why this is happening if the containing page is outside the Webapp as I intend on having people load the page in and iFrame via other domains..
This is probably a ViewState issue. The values in the TextBox controls come from the post data, not the ViewState, so it is no indication that it is working correctly.

Resources