Hi i wanted to call a C# function through javascript code.
For Eg: i have C# function which is in aspx.cs page
public void setValue()
{
lblMsg.Text = "hello";
....
.....
}
from javascript i need to call this function.
Hi i wanted to call a C# function through javascript code.
For Eg: i have C# function which is in aspx.cs page
public void setValue()
{
lblMsg.Text = "hello";
....
.....
}
from javascript i need to call this function.
Hello. This is not possible directly indeed. If you are using Web Forms you can have a C# button handler which will change text of your label in server side and then you can call the _doPostBack function for that handler.
Somehow you have to do as postback, either complete or partial. Use AJAX (UpdatePanel)