Reference to user control


J

Jimmy

Hi

I am trying to refer to a user control trhough a javascript.. is this
possible because this does not work:

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="WebApplication29.WebForm1" %>
<%@ Register TagPrefix="uc1" TagName="WebUserControl1"
Src="WebUserControl1.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<script type="text/javascript">
<!--
function sayHello()
{
document.myForm.theResponse.value="Hello";
document.myForm.yes.hiero.value="hiero";
}
//-->
</script>
<body>
<form name="myForm" id="myForm" action="#" method="get" runat=server>
<input type="text" name="theResponse" id="theResponse" size="40"> <input
type="button" value="Greet" onclick="sayHello();">
<br>
<uc1:WebUserControl1 id="uc" name="yes"
runat="server"></uc1:WebUserControl1>
</form>
</body>


<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="WebUserControl1.ascx.cs"
Inherits="WebApplication29.WebUserControl1"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:TextBox id="hier" name=hiero runat="server"
Width="336px"></asp:TextBox>


ch Jimmy
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top