I need to call a non static method from a static[webmethod]
. It is not getting call, I tested it using breakpoints.i tried to call it by making a instance to the class.
This is what i am trying .
[WebMethod]
public static string get_runtime_values(string get_ajax_answer_title,string get_ajax_answer_des)
{
if (get_ajax_answer_title.Equals("") && (get_ajax_answer_title.Equals("")))
{
return "null";
}
else
{
int got_question_id = getting_question_id;
DataHandler.breg obj = new DataHandler.breg();
obj.add_anwers(got_question_id, get_ajax_answer_title, get_ajax_answer_des);
return "inserted";
}
querystring object_new = new querystring();
object_new.show();
}
querystring is name of the class here.The control is going into if and else statements depending upon input,but after that it directly get jump out.Moreover when i hover the mouse over querystring ,it says
Unreachable code detected.
What should I do to make it working?