Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > runtime Javascript error after conversion from 1.1 to 2.0

Reply
Thread Tools

runtime Javascript error after conversion from 1.1 to 2.0

 
 
Rich
Guest
Posts: n/a
 
      01-10-2006
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_a lt", "", 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_al t", "", 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_a lt", "", 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_al t", "", 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>
</TABLE>
<font size="+0"><a href="javascript:__doPostBack('frmTasks','2')"
>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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime error after moving to 1.8.7 Gerardo Santana Gómez Garrido Ruby 4 01-16-2009 06:53 PM
strlen runtime error after call strcpy Duke C Programming 7 04-18-2007 11:05 PM
Perl runtime error after installing oracle 10g enigma Perl Misc 3 11-10-2006 07:28 PM
Runtime.exec(String[]) Doesn't Always Work, bBut Runtime.exec(String) Does Hal Vaughan Java 11 05-22-2006 04:49 PM
ASPX file returning obscur runtime error - after changing permissions to a subweb (.net app) to different permissions than on its parent ? Isabelle ASP .Net 0 08-11-2004 02:04 PM



Advertisments