Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

SliderShowExtender not working (VB.NET)

$
0
0

hi,

i tried simple implementation of slide control on a fresh web application and it fails to work.  maybe i am missing something.  thanks in advance for your assistance.  

here are the steps:

1- downloaded ajax toolkit and added controls to toolbox

2- added slideshow extender control on asp.net site master page

<asp:SlideShowExtender ID="bannerSlider" runat="server" AutoPlay="true" Loop="true" TargetControlID="bannerImage" SlideShowServiceMethod="GetSlides" />

3- Even though there is no reference to create the "target" control, i have added the image control right after it

<asp:Image ID="bannerImage" runat="server" />

4- Added the following imports and code in code file

Imports System.Web.Services
Imports System.Web.Script.Services

<WebMethod(), ScriptMethod()> _
Public Function GetSlides() As AjaxControlToolkit.Slide()
Dim nSlides(2) As AjaxControlToolkit.Slide

nSlides(0) = New AjaxControlToolkit.Slide("images/1.png", "New", "")
nSlides(1) = New AjaxControlToolkit.Slide("images/2.png", "Old", "")

Return nSlides
End Function

5- Build and run fails with exception that a script manager needs to be on page.  Added script manager.

<asp:ScriptManager ID="scriptMgr" runat="server" />

6- Build and run fails with exception

Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'GetSlides' failed with the following error: <html>
<head>
<title>Unknown web method GetSlides.<br>Parameter name: methodName</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Unknown web method GetSlides.<br>Parameter name: methodName</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.ArgumentException: Unknown web method GetSlides.<br>Parameter name: methodName<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[ArgumentException: Unknown web method GetSlides.
Parameter name: methodName]
System.Web.Script.Services.WebServiceData.GetMethodData(String methodName) +536898
System.Web.Handlers.ScriptModule.OnPostAcquireRequestState(Object sender, EventArgs eventArgs) +213
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +75
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

</font>

</body>
</html>
<!--
[ArgumentException]: Unknown web method GetSlides.
Parameter name: methodName
at System.Web.Script.Services.WebServiceData.GetMethodData(String methodName)
at System.Web.Handlers.ScriptModule.OnPostAcquireRequestState(Object sender, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>