using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        net.webservicex.www.StockQuote st = new net.webservicex.www.StockQuote();
        string [] s = st.GetQuote(TextBox1.Text, "");       
        Label1.Text = s[1];
        Label2.Text = s[3];
        Label3.Text = s[4];
        Label7.Text = s[5];
        TextBox2.Text = s[6];
这个红色部分显示No overload for method 'GetQuote' takes '2' arguments
是怎么解决的,求指点

解决方案 »

  1.   

    GetQuote这个方法没有带2个参数的重载版本。
      

  2.   

    意思是,没有提供两个参数的GetQuote方法
    GetQuote是什么方法,自己写的么。贴出来。
      

  3.   

    我在依葫芦画瓢 原版是这个 仿写的 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {    }    protected void Button1_Click(object sender, EventArgs e)
        {
            cn.com.webxml.webservice.WeatherWS ws = new cn.com.webxml.webservice.WeatherWS();
            string[] s = ws.getWeather(TextBox1.Text, "");
            Label1.Text = s[1];
            Label2.Text = s[3];
            Label3.Text = s[4];
            Label7.Text = s[5];
            TextBox2.Text = s[6];        Label11.Text = s[7];
            Label12.Text = s[8];
            Label13.Text = s[9];
            Image1.ImageUrl = "weather/" + s[10];
            Image2.ImageUrl = "weather/" + s[11];        Label14.Text = s[12];
            Label15.Text = s[13];
            Label16.Text = s[14];
            Image3.ImageUrl = "weather/" + s[15];
            Image4.ImageUrl = "weather/" + s[16];
            Label17.Text = s[17];
            Label18.Text = s[18];
            Label19.Text = s[19];
            Image5.ImageUrl = "weather/" + s[20];
            Image6.ImageUrl = "weather/" + s[21];
            Label20.Text = s[22];
            Label21.Text = s[23];
            Label22.Text = s[24];
            Image7.ImageUrl = "weather/" + s[25];
            Image8.ImageUrl = "weather/" + s[26];
        }
    }
      

  4.   

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            net.webservicex.www.StockQuote st = new net.webservicex.www.StockQuote();
            string [] s = st.GetQuote(TextBox1.Text, "");
           
            Label1.Text = s[1];
            Label2.Text = s[3];
            Label3.Text = s[4];
            Label7.Text = s[5];
            TextBox2.Text = s[6];       
        } 
    }我才写了一点点 就出问题 就是那个什么参数的
      

  5.   

    高人有没有会重写这个GetQuote的?
      

  6.   

    net.webservicex.www.StockQuote这个服务是谁做的就找谁去
      

  7.   

    你的想象力真丰富。问题是这个葫芦和瓢它没有任何可比性。人家的这个web service是2个参数的,你随便换一个怎么可能碰巧也是2个参数的呢。
      

  8.   

    你添加下web引用。然后调用的时候,打出前面一个括号,VS会提示你有几个参数的。