Activating the BrowserTextControl Automatically
Internet Explorer requires users to manually click embedded .NET controls before interacting with them. This workaround loads an external JavaScript file that dynamically creates and appends the BrowserTextControl object element to the page, bypassing the activation step.

Since objects like Flash, ActiveX controls or .NET assemblies must be activated in Internet Explorer manually, you have to click on it to be able to use them. This is also valid for the BrowserTextControl of TX Text Control Server for ASP.NET (incl. Windows Forms). To read more about the reason for this change in Internet Explorer, please have a look at this blog entry.
Using ActiveX controls with the latest MSIE patch
To solve this issue in Internet Explorer 7.0, you have to add the object dynamically using Javascript. Just insert a DIV section into the ASPX page:
<div id="container">
</div>
This element will be used to add the object to the page. The Javascript that appends the object to the page must be a seperate file. In the ASPX page, we simply have to insert a reference to it:
<script src="script.js" type="text/javascript" language="javascript">
</script>
The Javascript itself creates a new object tag that will be added as a child to the container DIV section:
function activateControl(ContainerDIV,ClassID,Width,Height,Id)
{
var myObject = document.createElement(\'object\');
var containerObject = document.getElementById(ContainerDIV);
containerObject.appendChild(myObject);
myObject.width = Width;
myObject.height = Height;
myObject.classid = ClassID;
myObject.id = Id;
}
activateControl(\'container\',\'http:BrowserBin/BrowserApplication.dll#BrowserApplication.BrowserAppControl\',800,600,\'BrowserApp\');Related Posts
TX Text Control Security Wizard Available
A downloadable Security Wizard application simplifies .NET Code Access Security configuration for BrowserTextControl in Internet Explorer. Deployed via ClickOnce, the tool runs with elevated…
Overriding IE's Predefined Shortcuts Like CTRL-B
Internet Explorer intercepts CTRL-B and CTRL-I when a BrowserTextControl is hosted in a user control, triggering browser dialogs instead. Overriding ProcessCmdKey in the user control captures…
BrowserTextControlSampleVisual Studio
BrowserTextControl: Using Post-build Events in Visual Studio
During BrowserTextControl development on a local machine, Internet Explorer caches the user control and skips re-downloading it when the codebase changes. Adding gacutil.exe /cdl as a Visual…
BrowserTextControlServerTextControl
BrowserTextControl: Compressed File Transfer
TX Text Control Server for ASP.NET 14.0 replaces .NET remoting with a new file I/O model for BrowserTextControl. ServerTextControl converts MS Word documents to byte arrays, which are sent to the…
ASP.NET: Getting the Client's .NET Version
TX Text Control Server for ASP.NET requires .NET Framework on the client machine for BrowserTextControl. This article shows how to detect installed .NET versions server-side by parsing the…
