ASP .NET - CollapsiblePanelExtender does not work in IE7 - asp.net

I am running the ASP .NET AJAX Toolkit 3.5.
I have setup a panel with a collapsablePanelExtender and it works in Firefox 3.5 but not in IE7! In IE7 all the "collapsed" panels never shrink - activating the button does nothing.
My code:
<asp:ImageButton ID="btnA" runat="server" ImageUrl="~/Image/expand.gif" />
<asp:Panel ID="pnlA" runat="server" >
<!-- grid -->
<asp:GridView ID="gridA" runat="server"
AllowPaging="True" AllowSorting="True"
DataSourceID="sdsA" GridLines="Vertical">
</asp:GridView>
</asp:Panel>
<cc1:CollapsiblePanelExtender ID="cpeA" runat="server"
Enabled="True" TargetControlID="pnlA"
CollapsedSize="0" ExpandedSize="300" Collapsed="true" ScrollContents="true"
ExpandControlID="btnA" CollapseControlID="btnA"
ExpandDirection="Vertical" ExpandedImage="~/Image/collapse.gif"
CollapsedImage="~/Image/expand.gif"
ImageControlID="btnA" AutoExpand="false" SuppressPostBack="true">
</cc1:CollapsiblePanelExtender>
Is there something wrong with the code?
The DOCTYPE I have been using is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I also tried:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
UPDATE1:
It looks as though clicking on the button resulting in the panel 'hiding' for a brief moment before it re-appears.

I just checked the code in IE8, Firefox and Chrome and it seems to be working with all of them. Just check it out on IE8, and let me know if it works.
Either IE7 settings, or the browser itself is at fault. Code is just fine.

I'll provide an additional answer in case anyone else encounters this:
A possible alternative is to use the accordion control. This works well in IE7.

Related

ASP Ajax tookit html extended causing treeview SelectedNodeChanged event not to fire in Chrome

I have a textbox on webpage that I am using the Ajax toolkit extended to make have differnt fonts, bolds etc available to it. However this is causing a treeview node change event not to run at all in Chrome. It is fine in Firefox and was fine in Chrome a couple of weeks ago. As far as I am aware, nothing has changed in the code to stop it working, so the only thing I can think of is maybe a Chrome update has stopped it working.
My code for the ajax bit and text box are as follows. If i comment out the ajax bit, everything works.
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" />
<ajaxToolkit:HtmlEditorExtender ID="HtmlEditorExtender1" TargetControlID="txtQuestion" EnableSanitization="false" DisplaySourceTab="false" runat="server">
<Toolbar>
<ajaxToolkit:Bold />
<ajaxToolkit:Italic />
<ajaxToolkit:ForeColorSelector />
</Toolbar>
</ajaxToolkit:HtmlEditorExtender >
<asp:TextBox ID="txtQuestion" Height="100px" TextMode="MultiLine" autocomplete="off" runat="server" Width="490px"></asp:TextBox>
If anyone can help, i'd be extremely grateful
I am having the same problem with my site that uses HtmlEditorExtender. Looks like it has something to do with Chrome update. Have a look here for more details and workaround:
http://code.google.com/p/chromium/issues/detail?id=395318

IE9 always runs in IE7 Compatibility mode

I have a simple page in asp.net vs2008, when run in IE 9, the compatibility view button is visible, when clicked, the web page always run in IE7 compatibility mode.
Why the page does not does run in IE8, when compatibility view button is clicked? Do we even have IE8 compatibility view?
Here is the html code:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" Text="Testing"></asp:TextBox>
</div>
</form>
</body>
</html>
Try this:
Step 1:Turn off compatibility view and check.
Open internet explorer.
Click on Alt key on the keyboard. Now click on Tools in menu bar.
Select Compatibility View Settings.
Remove the check mark for Display all websites in Compatibility View
and close the Compatibility View Settings window.
Step 2: Reset internet explorer settings and check.
Fore more information refer : Microsoft link

Ext.NET DateField - formatting reversing itself

We have a weird situation where an Ext.NET datefield is 'switching' formats if we input values in a certain style.
Specifically, if I input '01/12/09', when I blur the field, it will appear as '12/01/2009'. If I then focus the field and remove the '20' so the format reads '12/01/09' when I blur the field, it will 'switch' and show '01/12/09'.
What's odd is that we only see this behaviour on our production environment. I've done all the obvious things like checking the locale/region settings on the production box but haven't yet found anything which circumvents the behaviour.
Does anyone have any ideas on places to check next? This is based on Ext.js 3.3.1.
Many thanks,
Doug
Here's a simple test I used in an attempt to recreate the problem, although was unable.
<%# Page Language="C#" UICulture="en-GB" %>
<%# Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:DateField ID="DateField1" runat="server" />
</form>
</body>
</html>
Which version of Ext.NET are you using 1.0, 1.1 or 1.2?
Can you modify the sample above to demonstrate the issue.

asp net 4 - autopostback doesnt fire in ie6

OK, Im really stumped and hoping this is something simple. I have a form that relies on an autopostback of a radiobuttonlist to show or hide something. This was really elaborate at first and working fine, until I tested in IE6. The code below is as basic as I can get, all my code behind does is update the label to the radiobutton's selected value on click. This works in IE7 and 8, but not in IE6, what gives?
<%# Page Title="" Language="vb" AutoEventWireup="false" CodeBehind="testpostback.aspx.vb" Inherits="Checkout.testpostback" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:RadioButtonList ID="radio1" runat="server" AutoPostBack="true">
<asp:ListItem Text="Check1" Value="Check1" />
<asp:ListItem Text="Check2" Value="Check2" />
</asp:RadioButtonList>
<asp:Label ID="label1" runat="server" Text="none" />
</form>
</body>
</html>
Take a look at the generated javascript in your web page and probably it uses new features of javascript that couldn't be executed by IE6.
Chances are you can debug the javascript and see what happens.
Consider that IE6 in XP Sp3 is not the same as IE6 in earlier XPs and it has less problems.
This came up in this question as well. It seems to be an IE6 bug.

Asp.net button doesn't submits disabled controls, even with submitdisabledcontrols="true"

I have a page with some disabled controls, it looks like this
<form id="form1" runat="server" submitdisabledcontrols="true">
<asp:UpdatePanel ID="upp" runat="server">
<ContentTemplate>
<asp:TextBox ID="textbox1" runat="server" AutoPostBack="True" ontextchanged="textchaged_handler" />
<asp:TextBox ID="textbox2" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:ImageButton ID="ibVerify" runat="server" OnClick="btnVerify_Click" ImageUrl="~/img/imagebutton.png" AlternateText="Verify" />
</form>
Programatically, the second textbox is disabled with some server side code, during initialization.
The problem is that, even setting submitdisabledcontrols="true" in the form tag, the disabled textbox value isn't submited to the server when I click the ImageButton. I checked this with firebug, and also in VS, where the old value is retrieved.
When I press TAB in the first textbox, however, the second textbox value gets posted, no matter submitdisabledcontrols is set or not...
Any ideas?
That form attribute states that "Gets or sets a Boolean value indicating whether to force controls disabled on the client to submit their values.", so I think you need to use the client-side disabled property, not the server-side ENabled property, as in:
<asp:TextBox .. disabled="disabled" />
Instead of
control.Enabled = false;
Use
control.Attributes.Add("disabled", "disabled");
Thus from an asp .net perspective the control is still enabled, but it is rendered client-side as a disabled control.
In case any one else comes upon this page like I did, I found that the reason that "submitdisabledcontrols = true" was not working was because of my page doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
when I changed this to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
then it worked.
Hope this helps someone :)

Resources