Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to do Employing defensive code in the UI to ensure that the current frame is the most top level window in c#

<script>
    try {
        if (top.location.hostname != self.location.hostname) throw 1;
    } catch (e) {
        top.location.href = self.location.href;
    }
</script>
Source by forums.asp.net #
 
PREVIOUS NEXT
Tagged: #Employing #defensive #code #UI #ensure #current #frame #top #level #window
ADD COMMENT
Topic
Name
2+4 =