473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Reference to user control


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
Nov 19 '05 #1
0 767

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DC Gringo | last post by:
I have a user control that is reused in 5 .aspx pages and references a variable called "theSection" which is set in the class for each .aspx page. If I only had one .aspx page, I would reference...
2
by: Zippy | last post by:
Some months ago, we requested help from this newsgroup on how to replace the library reference of a database with another library reference, prior to creating an MDE. I got the following answer...
0
by: Patrick | last post by:
This is a C# post. I'm using VB.NET to create an add-in for the Google Sidebar, and have implemented the OnDetailsView method. NOTE : I've come across this same problem (error message) even in...
1
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have...
9
by: Max | last post by:
How do I reference a datagrid on a page from a user control on that page? In my user control, I'd like to have something like this... MyDataGrid being on the page, not in the user control... I...
9
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a...
1
by: Don | last post by:
I created a Web User Control in my project and need to use it in a datagrid. The data in this control needs to be updated and the control has several properties that need to be databound. Using...
2
by: Chris Kettenbach | last post by:
Good Morning, I have a user control I dynamically load in the page_init event into a asp:placeholder control. This page also has another placeholder I would like to dynamically load controls into...
7
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb --...
10
by: Richard Lewis Haggard | last post by:
I've created in form that has tab controls that contain tab controls that host user controls on each tab page. It compiles and runs just fine but the designer view fails with a "A circular control...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.