If the iframe is a .net page in the same domain you should be able to get the user name using Page.Request.User.Identity.Name if the user is authenticated.
Else you would have to get it from the page containing the iframe and pass it in as a query string param
Hope it helps,
Joe