RegisterStartupScript in User Control

G

Guest

I have a user control (.ascx) on a web form (.aspx). So far no code other
than on the page

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
Inherits="Test.default"%>
<%@ Register TagPrefix="test" TagName="test1" Src="test1.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>default</title>
</head>
<body>
<form id="Form1" method="post" runat="server">
<test:test1 id="myTest" Runat="server" />
</form>
</body>
</html>


and in the control there is no code. i want to add this line in the control
page load.


Page.RegisterStartupScript("ctrlId","<script>var ctrlId='"+this.ClientID
+"_';</script>")

but intellisense doesnt have a clue as to that line, it won't compile. BTW
this is ASP.Net 1.1.

Help
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top