Error 1 The type or namespace name 'publicstaticstring' could not be found (are you missing a using directive or an assembly
code
========
<script type="text/javascript">
function settype()
{
PageMethods.Gettype(document.getElementById("<%=H_TYPE.ClientID%>").value, OnSuccess);
}
function OnSuccess(response, userContext, methodName)
{
alert(response);
if(H_TYPE.value=="N")
{
document.getElementById("control1").style.visibility=true;
}
else if(H_TYPE.value=="T")
{
document.getElementById("control2").style.visibility=true;
}
}
</script>
[System.Web.Services.WebMethod]
publicstaticstring Gettype(string type)
{
return "Hello " + H_TYPE.Value;
}
protected void posyback_Click(object sender, EventArgs e)
{
try
{
Qry = " SELECT FTYPE FROM STATUS,";
SqlCommand cmd = new SqlCommand(Qry, con);
SqlDataReader reader = cmd.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
H_TYPE.Value = reader["FTYPE"].ToString();
}}
}
}