Header Ads

Programmatically Press F11 Key on Button Click Event to View Browser in Full Screen Mode

Clicking on F11 key will change the browser view mode into full screen mode. To implement it programmatically use the following code.

Add following Javascript code between <head></head> tags.

<script type=""type/javascript>
      function maxwin() {

            var wscript = new ActiveXObject("Wscript.shell");
            if (wscript!=null)
            wscript.SendKeys("{F11}");

        }
<script>

Call javascript function in button click event as below:

 <asp:Button ID="Button1" OnClientClick="maxwin();" runat="server" Text="Button"
      onclick="Button1_Click" />                             

  

3 comments:

Powered by Blogger.