473,396 Members | 1,748 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,396 software developers and data experts.

Access ASCX controls from the Code Behind file?

Hi All!

I'm using Code-behind model for my ASP.NET pages. But to skip the
compilation step, I reference my code-behind pages as follows...

<%@ Page Language="VB" Debug="true" Src="~/code/MyTestPage.vb" %>

It works beautifully. But how do I access the User Controls (non-compiled
ASCX files) those are placed in my MyTestPage.aspx ?

Thank you all in advance!

willy

Nov 19 '05 #1
4 9799
somebody please....

willy

"Willy" <11****@catchit.com.com.cmz> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All!

I'm using Code-behind model for my ASP.NET pages. But to skip the
compilation step, I reference my code-behind pages as follows...

<%@ Page Language="VB" Debug="true" Src="~/code/MyTestPage.vb" %>

It works beautifully. But how do I access the User Controls (non-compiled
ASCX files) those are placed in my MyTestPage.aspx ?

Thank you all in advance!

willy

Nov 19 '05 #2
help........ :'(

"Willy" <11****@catchit.com.com.cmz> wrote in message
news:Oq**************@TK2MSFTNGP12.phx.gbl...
somebody please....

willy

"Willy" <11****@catchit.com.com.cmz> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All!

I'm using Code-behind model for my ASP.NET pages. But to skip the
compilation step, I reference my code-behind pages as follows...

<%@ Page Language="VB" Debug="true" Src="~/code/MyTestPage.vb" %>

It works beautifully. But how do I access the User Controls (non-compiled
ASCX files) those are placed in my MyTestPage.aspx ?

Thank you all in advance!

willy


Nov 19 '05 #3
Check these articles out:
http://www.15seconds.com/issue/020319.htm
http://www.asp101.com/lessons/usercontrols.asp

There were top results for google search. They seem to have what you need

"Willy" wrote:
Hi All!

I'm using Code-behind model for my ASP.NET pages. But to skip the
compilation step, I reference my code-behind pages as follows...

<%@ Page Language="VB" Debug="true" Src="~/code/MyTestPage.vb" %>

It works beautifully. But how do I access the User Controls (non-compiled
ASCX files) those are placed in my MyTestPage.aspx ?

Thank you all in advance!

willy

Nov 19 '05 #4
"Willy" <11****@catchit.com.com.cmz> wrote in message
news:#B**************@TK2MSFTNGP14.phx.gbl...
Hi All!

I'm using Code-behind model for my ASP.NET pages. But to skip the
compilation step, I reference my code-behind pages as follows...

<%@ Page Language="VB" Debug="true" Src="~/code/MyTestPage.vb" %>

It works beautifully. But how do I access the User Controls (non-compiled
ASCX files) those are placed in my MyTestPage.aspx ?

Thank you all in advance!

willy

Like this:
Private TabPersonalia As TabPersonaliaUC ' user defined control

and in the page load:

' cast user defined controls to make visible in code behind

TabPersonalia = DirectCast(FindControl("TabPersonalia"), TabPersonaliaUC)


Nov 19 '05 #5

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

Similar topics

18
by: Sean | last post by:
Hi, I need a pop-up window for user to confirm change. The default button is the second option (No). As the user only use IE, I think the VBScript is an option. The following code only works for...
1
by: Michael Evanchik | last post by:
Tying not to spaghetti code which seems to be easy to do in .net, im trying to do my main .net html in index.aspx, use repeated .net html in an .ascx files and all code im doing in .vb code behind...
2
by: Greg Linwood | last post by:
How does one access HTML elements from code-behind? I've got a mix of asp:Labels & <font> elements - I'd like to continue using <font> elements, but be able to access them from code-behind to set...
2
by: Ric | last post by:
im new to asp.net. from what i understand, you have the aspx file (presentation), user-control(ascx file), code-behind(vb file) and components(compiled vb and dll files). the aspx file contains a...
1
by: Me | last post by:
Hi, I inherited a web application that has several very similar forms for gathering user data. User's must choose the form that best fits their needs and fill it out. Each form has about 15...
19
by: Alan Silver | last post by:
Hello, I have been developing ASP.NET with a text editor so far (better way to learn initially), and have now been trying Visual Web Developer. I want to create a project for an existing site...
0
by: John Lau | last post by:
Hello, In Asp.Net 1.1, I am using a single code behind file that is shared by multiple Aspx pages and a second shared code behind file for Ascx user controls. The VS 2003 IDE is a bit quirky,...
9
by: Alan Silver | last post by:
Hello, I have a user control which I am trying to load dynamically, but am running into problems. I think the problem is because I have two .ascx files that refer to the same .ascx.cs file. A...
2
by: Hiten | last post by:
Is it possible to have more code behind file but that file will have same class in way of partial class, Default Structure I -------------- Homepage.aspx + Homepage.aspx.cs (this .cs file...
0
by: BM | last post by:
Hi, I' using ASP.net 2.0. I have 2 design pages, which are the same, but in 2 languages. Is it possible to use only one code-behind page for both these pages bcoz, the code and logic and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
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 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.