runtime Javascript error after conversion from 1.1 to 2.0

Discussion in 'ASP .Net Mobile' started by Rich, Jan 10, 2006.

  1. Rich

    Rich Guest

    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>
    </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?
     
    Rich, Jan 10, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Isabelle
    Replies:
    0
    Views:
    565
    Isabelle
    Aug 11, 2004
  2. Hal Vaughan
    Replies:
    11
    Views:
    1,119
    Gordon Beaton
    May 22, 2006
  3. Duke

    strlen runtime error after call strcpy

    Duke, Apr 18, 2007, in forum: C Programming
    Replies:
    7
    Views:
    278
    CBFalconer
    Apr 19, 2007
  4. Gerardo Santana Gómez Garrido

    Runtime error after moving to 1.8.7

    Gerardo Santana Gómez Garrido, Dec 19, 2008, in forum: Ruby
    Replies:
    4
    Views:
    102
    Gerardo Santana Gómez Garrido
    Jan 16, 2009
  5. enigma
    Replies:
    3
    Views:
    186
    Ingo Menger
    Nov 10, 2006
Loading...

Share This Page