Click here to Skip to main content
15,887,860 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I add Script Manager to my project, I am getting an error like Microsoft JScript runtime error: 'Sys' is undefined

Currently My Project is running in .net 2.0, but the same code is working fine in .net 3.5

error
XML
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWMALzwbDZDAK03MqDDQKUkLvODAKCiqTKDALGh692AqbGo7IOArngxosGAuzRsusGAofT9N0BAo/i9bcEAorJlaUHAu/u7swDAoXJ9IgOAoXJ4OUGAoXJ3NIMAoXJyK8FAoXJhJwDAoXJsPkLAoXJ7OcBAoXJmMMKAoXJlOILAoXJgL8MAvjI3vYBAofL3vYBAvrI3vYBAvnI3vYBAvzI3vYBAvvI3vYBAv7I3vYBAv3I3vYBAoDL3vYBAo/L3vYBAvjImucPAofLmucPAvrImucPAvnImucPAvzImucPAq7qoscKAq7q3scKAq7qyscKAq7qxscKAq7q0scKAq7qzscKAq7q+scKAq7q9scKAsDgkvcLAqvJsIoOArLzx4IMwEP+vnXlqpR8Q+ACzoM4Co/LHIc=" />
</div><script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
<


My code is below

XML
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <table>
            <tr>
                <td width="200px">
                    <asp:DropDownList ID="ddlSearchFilter" runat="server" AutoPostBack="true"
                        CssClass="texdropdown"
                        onselectedindexchanged="ddlSearchFilter_SelectedIndexChanged" Width="200px">
                        <asp:ListItem>Select</asp:ListItem>
                        <asp:ListItem Text="Branch" Value="Branch"></asp:ListItem>
                        <asp:ListItem Text="Department" Value="Department_Name"></asp:ListItem>
                        <asp:ListItem Text="Doctor Name" Value="DoctorName"></asp:ListItem>
                        <asp:ListItem Text="Generel Availability" Value="AvailabilityStatus"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:TextBox ID="TextBox1" runat="server" autocomplete="off"
                        AutoPostBack="true" Height="16px" ontextchanged="TextBox1_TextChanged1"
                        Width="293px"></asp:TextBox>
                    <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
                        ContextKey="DoctorName" MinimumPrefixLength="1" ServiceMethod="GetDoctorName"
                        ServicePath="WebSDoctor.asmx" TargetControlID="TextBox1" UseContextKey="true">
                    </cc1:AutoCompleteExtender>
                </td>
            </tr>
        </table>
Posted
Updated 4-Apr-11 21:47pm
v2
Comments
Dalek Dave 5-Apr-11 3:47am    
Edited for Grammar and Spelling.

Did you try Google - http://www.google.com/search?q=Microsoft+JScript+runtime+error%3A+%27Sys%27+is+undefined&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a[^]

It isn't that hard my friend and is said to be the programmer's best friend. The sooner you learn using it, the better for you.

Happy Coding!
 
Share this answer
 
Comments
Dalek Dave 5-Apr-11 3:47am    
Good Link
sathishreddy A 6-Apr-11 0:25am    
thank you now my code is working
Ankur\m/ 6-Apr-11 0:30am    
Most welcome! I am glad that you got it working.
I would also request you to add an answer here explaining how you solved it. You may also refer to the links which gave you the solution.
Thank you!
guru.talk 14-Sep-12 2:51am    
hows it working sathishreddyA Saab ?, is it fashion applauding all-n-around your near, jst for makin some points ?
Ankur\m/ 14-Sep-12 7:50am    
The way I see is you are creating multiple comments "just to make some points". Did you go over the link and read the discussions? :doh:
Microsoft JScript runtime error: 'Sys' is undefined

This error we can solve by adding some code in webconfig file ... code is bellow

XML
<httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </httpModules>


place this code in <system.web>
 
Share this answer
 
Comments
Anoop Ananthan 23-Apr-12 4:18am    
This does not work, anyway this code is already added when solution/projects are created.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900