asp net 4 - autopostback doesnt fire in ie6 - asp.net

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.

Related

AjaxControlToolKit v16.1.0.0 TabContainer

I upgraded to the latest version of AjaxControlToolKit and now none of my Ajax tab controls work. Previously they worked fine.
After the upgrade, my tab controls defaulted to invisible. I can force visibility with style="visibility:visible" in the tabContainer tag. Then it appears and looks ok, except that clicking on the tab headers does nothing. I tried setting them all with Enabled="True" with no effect.
<%# Page Language="vb" AutoEventWireup="false" CodeBehind="test1.aspx.vb" Inherits="Myapp.test1" %>
<%# Register TagPrefix="ajaxToolKit" Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="frmTest" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
<br /><br /><br /><br />
<ajaxToolKit:TabContainer ID="hello" runat="server" OnClientActiveTabChanged="TabChanged()" ActiveTabIndex="0">
<ajaxToolKit:TabPanel><HeaderTemplate>First Tab</HeaderTemplate>
<ContentTemplate>Text on first tab.</ContentTemplate>
</ajaxToolKit:TabPanel>
<ajaxToolKit:TabPanel><HeaderTemplate>Second tab</HeaderTemplate>
<ContentTemplate>Can't get this tab to appear.</ContentTemplate>
</ajaxToolKit:TabPanel>
</ajaxToolKit:TabContainer>
</form>
</body>
</html>
I needed to removed OnClientActiveTabChanged and ActiveTabIndex and it worked correctly. The older version was not so fussy and did not mind me having OnClientActiveTabChanged pointing to a missing function.
It is worth noting that I barked up the wrong tree for a long time because the problem seems to occur with ANYTHING is wrong with either the TabContainer or TabPanel tag. In my initial test code to try to identify the issue I stripped out everything and got the same problem without either of these two tags. However it turned out to be a different reason (I omitted runat="server" in the TabPanels).

AutoCompleteExtender Is not a known Element

Although, i write a code with all required lines in Asp.net , the Autocomplete extender not working ,i dont able to find the reason anyone can teach with code.
The Error i faced
Error 3 Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.
Error 4 Unknown server tag 'asp:ScriptManager'.
Error 4 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site.
Error 5 Unknown server tag 'asp:AutoCompleteExtender'.
Error 5 Element 'AutoCompleteExtender' is not a known element. This can occur if there is a compilation error in the Web site.
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!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 id="Head1" runat="server">
<title>AJAX AutoComplete</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtCity"
MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"
ServiceMethod="GetCity" >
</asp:AutoCompleteExtender>
</div>
</form>
</body>
</html>
AjaxControlToolkit i installed . and i want to excecute autocomplete textbox code
I think you have register you ajaxtoolkit as ajaxtoolkit tag on page so instead of using tag you should use tag. For example.
<AjaxControlToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtCity"
MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"
ServiceMethod="GetCity" >
Yes its workin now !! becoz of the auto generated bin folder in Vs .. and also i changed the ajax toolkit version 1.0.20229 For Visual studio 2005...Thank you so much for every one .. your replies helped me lot..

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.

IE input beeping

I hope someone can help. My asp.net application is exhibiting strange behaviour. Whenever I press the Return/Enter key I get a series of beeps/dings. It sort of goes dindindidindindinggggg !
I have reproduced the issue with a small sample application:
<%# Page Language="Oxygene" AutoEventWireup="true" CodeFile="Default.aspx.pas" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server">
</asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server">
</asp:TextBox>
</form>
</body>
</html>
This only happens in IE, in firefox and chrome there is no beeping.
Also as a side issue, if I remove one of the textboxes then there is no dinging but I get a post back instead.
Anyone know what is going on here?
Thanks,
AJ
The enter key has submit behavior for forms. The sound you're hearing is Internet Explorer's way of saying that it could not submit the form, as there is no submit button.
This is nothing .NET specific, but rather an intrinsic part of how IE communicates with the user. A quick test, excuse the sloppy HTML:
A form with no submit button will beep when user tries to submit it:
<form><input /><input /></form>
Adding a submit button will get you the click sound of a form being submitted instead:
<form><input/><input/><input type="submit" /></form>
You can get rid of that sound by preventing the submit:
<form onsubmit="return false;"><input/><input/><input type="submit" /></form>
Then the only problem is that the button is showing, which, i guess, is not what you want. It turns out that hiding it will make the first sound re-appear, unsurprisingly:
<form onsubmit="return false;">
<input/><input/>
<input type="submit" style="display: none;"/>
</form>
Here, the button is hidden, and so the browser behaves as in the first scenario where there is no button. But if we hide it in a more elaborate way, so that the browser cannot be sure that it's not showing up, we can get around that problem too:
<form onsubmit="return false;">
<input/><input/>
<input type="submit" style="background-color: transparent; border: 0;" value="" />
</form>
Now, it should be noted that in this last solution, there'll still actually be a button there, that the user cannot see, but can click anyway (it won't submit, tho). I don't advocate this, but if you're going with this solution, you probably want to set width and height to something really small as well. My ambition was not to come up with the best hack, but simply to create a series of instructive examples that illustrates why the browser behaves the way it does given certain situations.
Well, you do not have a Submit button so it may be informing you that there is no automatic post-back handling. That would be my first guess.
I found the answer:
<%# Page Language="Oxygene" AutoEventWireup="true" CodeFile="Default.aspx.pas" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body onkeypress="if(event.keyCode==13)return false;">
<form id="form1" runat="server" onsubmit="return false;">
<asp:TextBox ID="TextBox1" runat="server">
</asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server">
</asp:TextBox>
</form>
</body>
</html>
This stops the beeping and stops a post-back when only a single input element.

ASP .NET - CollapsiblePanelExtender does not work in IE7

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.

Resources