Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Access ASCX controls from the Code Behind file?

Reply
Thread Tools

Access ASCX controls from the Code Behind file?

 
 
Willy
Guest
Posts: n/a
 
      12-07-2004
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



 
Reply With Quote
 
 
 
 
Willy
Guest
Posts: n/a
 
      12-07-2004
somebody please....

willy

"Willy" <(E-Mail Removed)> wrote in message
news:%23BRZZo$(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
 
 
 
Willy
Guest
Posts: n/a
 
      12-07-2004
help........ :'(

"Willy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> somebody please....
>
> willy
>
> "Willy" <(E-Mail Removed)> wrote in message
> news:%23BRZZo$(E-Mail Removed)...
>> 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
>>
>>
>>

>
>



 
Reply With Quote
 
Tampa .NET Koder
Guest
Posts: n/a
 
      12-07-2004
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
>
>
>
>

 
Reply With Quote
 
Frits van Soldt
Guest
Posts: n/a
 
      12-07-2004
"Willy" <(E-Mail Removed)> wrote in message
news:#BRZZo$(E-Mail Removed)...
> 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)




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-code behind to code behind John ASP .Net 2 02-19-2007 07:08 PM
custom ascx file register the component in the code behind Sakkatha ASP .Net 1 12-20-2005 09:31 AM
.ASCX files, ASPX files and code behind =?Utf-8?B?UGF1bA==?= ASP .Net 3 09-26-2005 11:53 PM
Access ASCX controls from the Code Behind file? Willy ASP .Net 4 12-07-2004 12:27 PM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM



Advertisments