fiogf49gjkf0d First of all, enabling/disabling the button:
On the Load event of the Form (or on a Load Action):
MyButton.Enabled = oppty.Account.ParentId != null; //Assuming that oppty is the name of an Object casted from BindingSource.Current
Now, not sure what you want the button to do. If you want it to navigate to the Parent account you could do so. A Server side way to do this would be:
On the Click event of the button:
Response.Redirect("Account.aspx?entityid=" + oppty.Account.ParentId.ToString()); //Same assumption on the definition of oppty as above.
|