Consider the following code:
GoTo Label2 ... [content here] ... More content
Moving to a anchor from server side, example is c#.
ClientScript.RegisterStartupScript(this.GetType(), "hash", "location.hash = '#form';", true);