This is a complete code example for returning code from a Telerik RadWindow.
The code is copied from the Demo code, but is greatly simplified to more clearly show what is needed to pop up a RadWindow and then to return data from it.
Note that the code runs inside a Master Page, and depends on that page having a RadScriptManager in it already.