Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:27:23+00:00 2026-05-26T19:27:23+00:00

I’m using an ASP.NET application with a web service, and for some reason one

  • 0

I’m using an ASP.NET application with a web service, and for some reason one of the web service methods gets skipped. I’m sure it’s a fairly simple problem, but it’s had me stumped for over a day. Am I putting the method call in the wrong method, I would assume OnPreRender would handle everything before the page finshes loading. I am fairly confident that the problem is in this area, if I set the form object’s ImageLoc to a URL when it is instantiated it loads in the ASP.NET page just fine.

I don’t think I left out any relevant code, but if you need to see anything else let me know. The form object is just a few properties with get/set so I left it out. Also please note that String parameters will be changed to something else, I am just trying to get the ground work set up.

.aspx.cs :

     localhost.MobileFormServices wsMobile = new localhost.MobileFormServices();

    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        //Call the web service to pass image URL 
        wsMobile.NewForm("parameters");
        FormImage.ImageUrl = wsMobile.FormProperties().ImageLoc;
    }

web service methods:

   //new form object instance
    private FormLibrary.Form form = new FormLibrary.Form();

    //adds the image location to the form object
    [WebMethod]
    public void NewForm(String parameters)
    {
        form.ImageLoc = "http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg"; //breakpoint here, never hit
    }

   [WebMethod]
    public FormLibrary.Form FormProperties() 
    {
        return this.form;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:27:23+00:00Added an answer on May 26, 2026 at 7:27 pm

    Are you sure web service isn’t called? The call

    FormImage.ImageUrl = wsMobile.FormProperties().ImageLoc;
    

    although uses same object instance on your page calls completely different instance on Web Service side than when method

     wsMobile.NewForm("parameters");
    

    was called. Because of that

    private FormLibrary.Form form = new FormLibrary.Form();
    

    is called on every web service call.

    On every web service call new instance of web service handling the call is created.
    So in your example.

    1. wsMobile.NewForm(“parameters”) – new FormLibrary.Form is created when instance handling this call is created.

    2. in this call you set form.ImageLoc – but this form is local to that instance

    3. FormImage.ImageUrl = wsMobile.FormProperties().ImageLoc; – again new FormLibrary.Form is created for instance handling this call

    4. you return ImageLoc of new created FormLibrary.Form. Not what you previously set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
Seemingly simple, but I cannot find anything relevant on the web. What is the
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.