i m working on VS.NET2003 and tried this example.
http://www.c-sharpcorner.com/UploadFile/dsandor/ActiveXInNet11102005040748AM/ActiveXInNet.aspx
i m getting the HTML page having the input box and the command button "Click Me".
when i enter anyt ext in the input box and click on the button then it gives the input box string on the URL after ?........but the button doesn't redirect to the user control page.
Am i making any mistake?

<script language="javascript">
function doScript()
{
myControl1.UserText = frm.txt.value;
}
</script>


In above code you will have to make some changes like :

instead of myControl1.UserText
use document.frm.getElementById("Here the Id will be some concated string with myControl1$.**")

** You can view the viewsource of html page to see the id of that textbox.


Another thing is that

In stead of frm.txt.value

use document.frm.getElementById("txt").value

<script language="javascript">
function doScript()
{
myControl1.UserText = frm.txt.value;
}
</script>


In above code you will have to make some changes like :

instead of myControl1.UserText
use document.frm.getElementById("Here the Id will be some concated string with myControl1$.**")

** You can view the viewsource of html page to see the id of that textbox.


Another thing is that

In stead of frm.txt.value

use document.frm.getElementById("txt").value

i was doing this but when i write document.frm........in place of getElementById i m getting getElementsByTagName but when i write
document.....i get getElementById but after doing this R&D also the application is not working.
I m not getting
Here the Id will be some concated string with myControl1$.**")

just do document.getElementById("").value;

first comment out the javascript and see the viewsource and find the rendered Id of the Usercontrols's TextBox and put it .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.