Harreni
asked on
Error: The type or namespace name 'localhost' could not be found (are you missing a using directive or an assembly reference?)
Hi Experts,
I'm using visual studio 2012 and just started building my first web service. When I tried to build my website that host a simple web service, I keep getting this error :
Error1 The type or namespace name 'localhost' could not be found (are you missing a using directive or an assembly reference?) C:\Users\IT\Documents\Visu al Studio 2012\WebSites\Temprature\T emprature. aspx.cs 22 9)
and the code snippet that has this error is :
So, please guide me to solve this issue.
Thanks a lot in advance.
Harreni
I'm using visual studio 2012 and just started building my first web service. When I tried to build my website that host a simple web service, I keep getting this error :
Error1 The type or namespace name 'localhost' could not be found (are you missing a using directive or an assembly reference?) C:\Users\IT\Documents\Visu
and the code snippet that has this error is :
sing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Temprature : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
localhost.Convert wsConvert = new localhost.Convert();
double temperature =
System.Convert.ToDouble(TemperatureTextbox.Text);
FahrenheitLabel.Text = "Fahrenheit To Celsius = " +
wsConvert.FahrenheitToCelsius(temperature).ToString();
CelsiusLabel.Text = "Celsius To Fahrenheit = " +
wsConvert.CelsiusToFahrenheit(temperature).ToString();
}
}
So, please guide me to solve this issue.
Thanks a lot in advance.
Harreni
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What does the list look like? Can you screenshot it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot käµfm³d, Chris and Steven you're all helped me.
I forgot to add "using System.Web.Services;" to my name spaces list
I forgot to add "using System.Web.Services;" to my name spaces list
ASKER
I did what you suggest me to do and I got a long list but I don't know which one is correct.