473,569 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client (/Script) Callback fails on certain IE6 installlation

Hi,
I've been trying to get a simple client / script callback to work. I
was using IE6 to the ASP Development Server / IIS 5 and it just
didn't work. I ended up using an example straight from an asp 2.0 book
and it still didn't work. However I noticed that it worked on firefox on
the development machine, and also IE6 and firefox from a remote machine.

I set various breakpoints and noticed that the firefox callback ends up
in the correct looking callback in the aspx file on the server, but
the failing IE6 browser ends up in SECOND call to Page_Load. It's as
if that specific browser <-server configuration fails to properly
let IIS know its a special call, not just a standard http request.

I stepped through the failing IE6 code and it goes into a file called
WebResource.axd ?blahblah and into an expanded
function WebForm_DoCallb ack(eventTarget , eventArgument,
eventCallback, context, errorCallback, useAsync)
which create a new ActiveXObject(" Microsoft.XMLHT TP")
and calls it. But as I say it ends up in page_load on the server
and the callback fails.

So my question is, why would a simple example fail on a single IE6
installation in such a bizarre manner, and why would firefox locally
and IE6 + firefox remotely all work fine? I checked the settings in
the local IE and it seems ok.
It's generally a well behaved browser, so, I'm actually now scared to
use this functionality as I don't want support issues with a % of
similar browsers once anything is released.

Any ideas? Its a worrying issue, supportwise!

Example follows for reference (from Prof Asp.Net 2.0 by Wrox)

// RandomNumber.As px
<%@ Page Language="C#" AutoEventWireup ="true"
CodeFile="Rando mNumber.aspx.cs " Inherits="Rando mNumber" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Callba ck Page</title>

<script type="text/javascript">
function GetNumber(){
UseCallback();
}

function GetRandomNumber FromServer(Text Box1, context){
document.forms[0].TextBox1.value = TextBox1;
}
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="Get Random Number"
onclick="GetNum ber()" />
<br />
<br />
<asp:TextBox ID="TextBox1" Runat="server"> </asp:TextBox>
</div>
</form>
</body>
</html>

--------------------------------
// RandomNumber.as px.cs

using System;
using System.Data;
using System.Configur ation;
using System.Collecti ons;
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;

public partial class RandomNumber : System.Web.UI.P age,
System.Web.UI.I CallbackEventHa ndler
{
private string _callbackResult = null;

protected void Page_Load(objec t sender, EventArgs e)
{
string cbReference =
Page.ClientScri pt.GetCallbackE ventReference(t his,
"arg", "GetRandomNumbe rFromServer", "context");
string cbScript = "function UseCallback(arg , context)" +
"{" + cbReference + ";" + "}";

Page.ClientScri pt.RegisterClie ntScriptBlock(t his.GetType(),
"UseCallbac k", cbScript, true);
}

public void RaiseCallbackEv ent(string eventArg)
{
Random rnd = new Random();
_callbackResult = rnd.Next().ToSt ring();
}

public string GetCallbackResu lt()
{
return _callbackResult ;
}
}
Jan 12 '07 #1
0 1180

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

Similar topics

2
8151
by: Hardy Wang | last post by:
Hi, I have a page which will call RegisterStartupScript function to register a client script. I also need to remove it under some certain condition, is there a way? -- WWW: http://hardywang.1accesshost.com ICQ: 3359839 yours Hardy
4
4204
by: Don Parker | last post by:
Does the use of server side controls eg <asp:textbox> preclude the access to that control by client script? If not, how do you reference those elements? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
2
2961
by: Flinky Wisty Pomm | last post by:
Okay, I'm pretty baffled by this one. I've got a page in a popup which takes a postcode; looks up a list of addresses for that postcode; then uses a callback to get the details for a specific address, build a JS object and pass it back to the window.opener. This used to work, but without any obvious cause it has started throwing an...
1
1707
by: denappel | last post by:
Hi all, We're currently developping an asp.net 2.0 project, and ran into a problem with the new menu control. At the first load of the page, no errors are generated, but after a first postback an error pops up when hovering over a menu item: "Error: '0.cells' is null or not an object"
2
1939
by: ibiza | last post by:
Hi all, I have a quite big webform that has about ~15 validators. I found, after having looked at the generated HTML source, that the filesize is pretty big : about 65KB. Then, I added to every validator the property EnableClientScript="False", because I already have my neat client validation scripts. That cut off the size of the generated...
5
1995
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On some pages I have applied a small client-script to trap the enter-key beeing pressed and re-route this action. With the new version this little script...
1
1225
by: Velvet | last post by:
Does anyone know a way to force the client script to preform a client-side validation for controls in validation groups? What is currently happening is I have two validation groups (Billing, CreditCard). The validation doesn't happen until the submit button is pressed and the server validation happens. I added an OnClickClient event to...
0
1440
by: =?Utf-8?B?TG93bGFuZGVy?= | last post by:
Hello, I've built a web application that uses client script callbacks. It is used on a large network with a large variety of user OSes and IE versions. It was tested on IE 6 on different setups and IE 5.5 to a lesser degree without problems. I know of a least one user who gets an error in WebResource.axd when using the application. The...
2
1251
by: Ed Courtenay | last post by:
Reposting here as you can practically see the tumbleweed blow by in microsoft.public.dotnet.framework.aspnet.webcontrols.... I've got a very simple custom control that requires a small section of JavaScript to function at the client - nothing out of the ordinary. In the overridden RenderContents method of my custom control I check whether...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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...
0
8132
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...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
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...
0
3656
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...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
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
0
944
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...

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.