I am trying to setfocus on text box.
You can use
.Focus() on the control itself, or call the Page's
SetFocus(), passing in a reference to the control. Note that you need to pass in the control, not the ID, as that doesn't seem to be supported (at least as of .NET 3.5). See MSDN Page.SetFocus for more.
As to the difference between the methods? They're largely interchangeable, and you should call whichever is more convenient given the objects you have access to - usually calling
.Focus() on the control is easier. See How to Set Focus on ASP.NET Web Server Controls on MSDN.