I have created a base page (inherits from System.Web.UI.Page) from which all
my .aspx pages inherit. How can I reference a web-user-control from that
basepage? (e.g. the .aspx page calls a function on the base page
(this.SetSomeText('Hello')), which in turn will call a function in a
web-user-control (wuc.SetText()) if it exists on the page.
Thanks,
C. 3 2132
You could try using a conditional Page.FindControl( ...) call.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"chris" wrote:
I have created a base page (inherits from System.Web.UI.Page) from which all
my .aspx pages inherit. How can I reference a web-user-control from that
basepage? (e.g. the .aspx page calls a function on the base page
(this.SetSomeText('Hello')), which in turn will call a function in a
web-user-control (wuc.SetText()) if it exists on the page.
Thanks,
C.
Yes, I've tried that. If I cast to a Control, I can find the object, but
cannot cast it to the appropriate Web User Control, since I cannot seem to
reference the Web User Control.
"Peter Bromberg [C# MVP]" wrote:
You could try using a conditional Page.FindControl( ...) call.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"chris" wrote:
I have created a base page (inherits from System.Web.UI.Page) from which all
my .aspx pages inherit. How can I reference a web-user-control from that
basepage? (e.g. the .aspx page calls a function on the base page
(this.SetSomeText('Hello')), which in turn will call a function in a
web-user-control (wuc.SetText()) if it exists on the page.
Thanks,
C.
Are you using the WebSite project model? You will find it a lot easier to do
this kind of stuff with the Web Application Project Add-in.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"chris" wrote:
Yes, I've tried that. If I cast to a Control, I can find the object, but
cannot cast it to the appropriate Web User Control, since I cannot seem to
reference the Web User Control.
"Peter Bromberg [C# MVP]" wrote:
You could try using a conditional Page.FindControl( ...) call.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"chris" wrote:
I have created a base page (inherits from System.Web.UI.Page) from which all
my .aspx pages inherit. How can I reference a web-user-control from that
basepage? (e.g. the .aspx page calls a function on the base page
(this.SetSomeText('Hello')), which in turn will call a function in a
web-user-control (wuc.SetText()) if it exists on the page.
>
Thanks,
C.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike Levin |
last post by:
Hello Group,
I'm using VisualStudio.NET and put a DataGrid into a WebUserControl (an ascx
file). For the DataGrid element, I have set AllowSorting="True" and
OnSortCommand="Grid_Sort".
|
by: Chris |
last post by:
Hi,
I have 2 textboxes (txtVal1, txtVal2) in a WebUserControl
(WebCalcUserControl) for which I write public properties :
public int Value1
{
get { return Convert.ToInt32(txtVal1.Text); }...
|
by: DichkoSoft |
last post by:
Hi
I create WebUserControl and very confused when use control
For Example:
*****************************
*wuc.ascx
*****************************
<script id=clientEventHandlersJS...
|
by: Robert Ward |
last post by:
I am trying to load a web user control from code behind. This used to be
something simple in .net 1.1
Dim myControl As ControlName = CType(Page.LoadControl("ControlName .ascx"),
ControlName )
...
|
by: Christian H |
last post by:
Hello,
I've just created a WebUserControl that consists of a few other controls
such as DropDownList, TextBox and Button.
Based on the information entered in the DropDownlist, and TextBox, the...
|
by: Oren |
last post by:
Hello everyone...
I have a simple WebUserControl with Button and TextBox on it. Webform1.aspx
contains this WebUserControl.
How can I create my own C'tor for this WebUserControl - I mean when I...
|
by: Oren |
last post by:
Hi everyone,
I have WebUserControl on a Webform.
How can I sent dynamically to the WebUserControl from a Function/Property on
the Webform ?
<uc:myuc id="myid1" CurrentPage=<%#GetText()%>...
|
by: Giovanni |
last post by:
Dear Friends,
I have a decision to make and hope to get some insight: I have built
several WebUserControls one of which is a WebUserControl that queries an SQL
server database, retrieves a...
|
by: David |
last post by:
I created a WebUserControl and dragged it on a form. The control
works but the parent form is unaware of the control and can not access
any properties, receive events, etc. Eg. .net does not...
|
by: Klaus Jensen |
last post by:
Hi
In a repeater-control, in the <SeparatorTemplatei have placed a
webusercontrol, I have made. That works great-
However, I want to know be able to only display this WebUserControl a
certain...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |