I’m having some troubles with sharepoint webparts’ programming! I don’t know how to make an object rise a postback when i want! I read in many place that this can be done by “javascript”, but i can’t understand what they means..
Suppose I’m in this situation
void BIGenerate_Click(object sender, EventArgs e)
{
if (this.txtPassword.Text != "")
{
bla bla bla code
}
//CODE TO GENERATE POSTBACK
}
What code i have to put there? How can i invoke a javascript in that moment? Thank you very much!
ASP.NET creates a client side javascript to support postbacks:
Now you only have to call you postback function with some arguments:
Now you have to catch the postback in your codebehide: