Solved

ASP.Net  Vb Public Shared Function Variable

Posted on 2010-09-04
3
994 Views
Last Modified: 2012-05-10
Hi

I'm trying to add a variable to the below code, but every time I do I get an error:

Microsoft JScript runtime error: Sys.Net.WebServiceFailedException: The server method 'GetSlides' failed with the following error: System.InvalidOperationException-- Invalid web service call, missing value for parameter: 'Nodeinfo'.

My code is below can any one help?  (and befor any one asks txtnode.Text does exist)

Thanks

Brasso


<System.Web.Services.WebMethod(), System.Web.Script.Services.ScriptMethod()> _

    Public Shared Function GetSlides(ByVal Nodeinfo As String) As AjaxControlToolkit.Slide()





        Dim imgSlide(3) As AjaxControlToolkit.Slide

       

        imgSlide(0) = New AjaxControlToolkit.Slide("images/Chrysanthemum.jpg", "Autumn", "Autumn Leaves")

        imgSlide(1) = New AjaxControlToolkit.Slide("images/Desert.jpg", "Creek", "Creek")

        imgSlide(2) = New AjaxControlToolkit.Slide("images/Hydrangeas.jpg", "Landscape", "Landscape")

        imgSlide(3) = New AjaxControlToolkit.Slide("images/Jellyfish.jpg", "Dock", "Dock")



        Return (imgSlide)

    End Function



'Call Function



 GetSlides(txtnode.Text)

Open in new window

0
Comment
Question by:brasso_42
3 Comments
 
LVL 3

Expert Comment

by:aledev
ID: 33605973
Hi
what browser did you use for try this code? and are you running this from IIS?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33608769
This appears to be a web method, and it shouldn't be static (Shared)...
0
 
LVL 1

Accepted Solution

by:
brasso_42 earned 0 total points
ID: 33609522
Hiu

The answer is you cant directly.  You have to use Contextkey of you slideshowextender.

e.g.

    <System.Web.Services.WebMethod()> _
      <System.Web.Script.Services.ScriptMethod()> _
    Public Shared Function GetSlides(ByVal contextKey As String) As AjaxControlToolkit.Slide()
then

  SlideShowExtender1.ContextKey = txtnode.Text

to call the function / chage slides

thanks any way

brasso


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now