runtime Javascript error after conversion from 1.1 to 2.0

R

Rich

I am converting my enterprise solution from VS 2003 (.NET v1.1.4322) to VS
2005 (.NET v2.0.50727). The entire solution currently uses the following
technologies -
Windows Server 2003
Windows Mobile 2003
Windows XP Professional SP2
Windows 2000 Professional SP4
SQL Server 2000
Active Directory
C#
JavaScript
VB.NET
ASP.NET
ASP.NET Mobile
eVC++ 4.0
IE 6.0
Pocket IE

I have completed a portion of the conversion (ASP.NET Mobile), and while
testing I have a runtime error that did not exist in the 1.1 version.
It is associated with a Windows Mobile ObjectList (mobile:ObjectList
id="olstTask")
When debugging on the desktop in IE 6.0 (I have *not* yet started conversion
testing on the PDA), I click on a linkbutton in the object list
(<asp:LinkButton ID="lbnTask" CommandName="details" Runat="server"><%#
((ObjectListItem)Container)["name"] %></asp:LinkButton>) and now receive a
JavaScript error -
WebForm_PostBackOptions is undefined.

Here is the code that ASP.NET generates for the browser
-----------------------------------------------------------------------------------------------------------------

<html><body>
<form id="frmTasks" name="frmTasks" method="post"
action="poc_web_form1.aspx?__ufps=918838">
<input type="hidden" name="__VIEWSTATE"
value="/wEXAQUDX19QDwUIZnJtVGFza3MPBsE1LJaX48eIAgLnbyz/0czpG1XLJnTWdrRj4a6t9w==">
<input type="hidden" name="__EVENTTARGET" value="">
<input type="hidden" name="__EVENTARGUMENT" value="">
<script language=javascript><!--
function __doPostBack(target, argument){
var theform = document.frmTasks
theform.__EVENTTARGET.value = target
theform.__EVENTARGUMENT.value = argument
theform.submit()
}
// -->
</script>

<TABLE id="tblMyTasks" cellSpacing="1" cellPadding="1" width="300" border="0">
<TR><TD><IMG alt="Sea State 1" src="logo.png"></TD></TR>
<TR><TD>Task start:</TD><TD>Patient:</TD><TD>Task:</TD></TR>
<font size="-1">
<TR>
<TD><a id="olstTask__ctl1_lbnStart"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl1:lbnStart", "", true, "", "", false,
true))">10/24 9:00</a></TD>
<TD><a id="olstTask__ctl1_lbnPatient"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl1:lbnPatient", "", true, "", "", false,
true))">Lee, Terry</a></TD>
<TD><a id="olstTask__ctl1_lbnTask"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl1:lbnTask", "", true, "", "", false,
true))">medicate patient</a></TD></TR>
<TR bgcolor="#ccffcc">
<TD><a id="olstTask__ctl2_lbnStart_alt"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl2:lbnStart_alt", "", true, "", "",
false, true))">10/24 9:10</a></TD>
<TD><a id="olstTask__ctl2_lbnPatient_alt"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl2:lbnPatient_alt", "", true, "", "",
false, true))">Lee, Terry</a></TD>
<TD><a id="olstTask__ctl2_lbnTask_alt"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl2:lbnTask_alt", "", true, "", "",
false, true))">medicate patient</a></TD></TR>
<TR>
<TD><a id="olstTask__ctl3_lbnStart"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl3:lbnStart", "", true, "", "", false,
true))">10/24 9:20</a></TD>
<TD><a id="olstTask__ctl3_lbnPatient"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl3:lbnPatient", "", true, "", "", false,
true))">Sahu, Subakanta</a></TD>
<TD><a id="olstTask__ctl3_lbnTask"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl3:lbnTask", "", true, "", "", false,
true))">medicate patient</a></TD></TR>
<TR bgcolor="#ccffcc">
<TD><a id="olstTask__ctl4_lbnStart_alt"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl4:lbnStart_alt", "", true, "", "",
false, true))">10/24 9:30</a></TD>
<TD><a id="olstTask__ctl4_lbnPatient_alt"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl4:lbnPatient_alt", "", true, "", "",
false, true))">Sahu, Subakanta</a></TD>
<TD><a id="olstTask__ctl4_lbnTask_alt"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl4:lbnTask_alt", "", true, "", "",
false, true))">medicate patient</a></TD></TR>
<TR>
<TD><a id="olstTask__ctl5_lbnStart"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl5:lbnStart", "", true, "", "", false,
true))">10/24 10:00</a></TD>
<TD><a id="olstTask__ctl5_lbnPatient"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl5:lbnPatient", "", true, "", "", false,
true))">Bar, Dale</a></TD>
<TD><a id="olstTask__ctl5_lbnTask"
href="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("olstTask:_ctl5:lbnTask", "", true, "", "", false,
true))">medicate patient</a></TD></TR>
Next</a></font></font></form></body></html>

----------------------------------------------------------------------------------------------------------------------------------------------------------------

I know there is JavaScript embedded in System.Web.dll, for example -
function WebForm_PostBackOptions(eventTarget, eventArgument, validation,
validationGroup, actionUrl, trackFocus, clientSubmit)
My C# code behind already has "using System.Web;", and I tried adding "<%@
Import Namespace="System.Web" %>" to the .aspx file, but it did not help with
this issue.

Any ideas on what might cause this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top