Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Referencing to .ascx

Reply
Thread Tools

Referencing to .ascx

 
 
Tomas Kepic
Guest
Posts: n/a
 
      04-24-2005
Hi all,

in my application I create a USER CONTROL with name "test.ascx" with one
textbox named "User" and one button "Submit".

In my default page "default.aspx" I add this user contorol to page with using:

Control AAA = LoadControl("test.ascx");
FirstTest.Controls.Add(AAA);

and referencing <%@ Reference Control = "test.ascx" %> in html page. I also
use ASPLACEHOLDER for FirstTest Control.

My problem is that I don't know how can I reference in my "default.aspx"
page to value stored in User textbox in "test.ascx".

So I can't use value stored in textbox User in other parts of my projects. I
can't see it!

Please help me someone, I'm beginner in ASP and I can't continue. Please
help me.



I have this problem and I can't solve this for o
--
Tomas
 
Reply With Quote
 
 
 
 
Galin Iliev
Guest
Posts: n/a
 
      04-25-2005
Try just dragging USERControl from Solution explorer into your webpage
directly
thus you will see where it is placed.
set properly name to usercontrol
then declare control in page code class and you are ready

if you have troubles with this write me, pls

Regards
Galin Iliev

"Tomas Kepic" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> in my application I create a USER CONTROL with name "test.ascx" with one
> textbox named "User" and one button "Submit".
>
> In my default page "default.aspx" I add this user contorol to page with
> using:
>
> Control AAA = LoadControl("test.ascx");
> FirstTest.Controls.Add(AAA);
>
> and referencing <%@ Reference Control = "test.ascx" %> in html page. I
> also
> use ASPLACEHOLDER for FirstTest Control.
>
> My problem is that I don't know how can I reference in my "default.aspx"
> page to value stored in User textbox in "test.ascx".
>
> So I can't use value stored in textbox User in other parts of my projects.
> I
> can't see it!
>
> Please help me someone, I'm beginner in ASP and I can't continue. Please
> help me.
>
>
>
> I have this problem and I can't solve this for o
> --
> Tomas



 
Reply With Quote
 
 
 
 
Tomas Kepic
Guest
Posts: n/a
 
      04-25-2005
Hi Galin,

I dragged My UserControl from Solution explorer into my webpage, as you
wrote, but I don't know how to set property name to usercontrol. Can you
write me some example? This property should I write in HTML view
(default.aspx) or in "codebehind" default.aspx.cs.

Thanx for your time, and sorry that I'm asking you with this boring
questions, but I'm just beginner in ASP.NET.

Tomas

"Galin Iliev" wrote:

> Try just dragging USERControl from Solution explorer into your webpage
> directly
> thus you will see where it is placed.
> set properly name to usercontrol
> then declare control in page code class and you are ready
>
> if you have troubles with this write me, pls
>
> Regards
> Galin Iliev
>
> "Tomas Kepic" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi all,
> >
> > in my application I create a USER CONTROL with name "test.ascx" with one
> > textbox named "User" and one button "Submit".
> >
> > In my default page "default.aspx" I add this user contorol to page with
> > using:
> >
> > Control AAA = LoadControl("test.ascx");
> > FirstTest.Controls.Add(AAA);
> >
> > and referencing <%@ Reference Control = "test.ascx" %> in html page. I
> > also
> > use ASPLACEHOLDER for FirstTest Control.
> >
> > My problem is that I don't know how can I reference in my "default.aspx"
> > page to value stored in User textbox in "test.ascx".
> >
> > So I can't use value stored in textbox User in other parts of my projects.
> > I
> > can't see it!
> >
> > Please help me someone, I'm beginner in ASP and I can't continue. Please
> > help me.
> >
> >
> >
> > I have this problem and I can't solve this for o
> > --
> > Tomas

>
>
>

 
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
Can I connect from/to internal network by referencing it outside static nat? war_wheelan@yahoo.com Cisco 5 01-14-2006 02:14 AM
Can I connect from/to internal network by referencing it outside static nat? war_wheelan@yahoo.com Cisco 0 01-11-2006 05:48 PM
Can I connect from/to internal network by referencing it outside static nat? war_wheelan@yahoo.com Cisco 0 01-11-2006 05:48 PM
vhdl source cross-referencing tool geoffrey wall VHDL 7 07-07-2005 04:48 PM
name-based referencing of collection members? K. Shier ASP .Net 6 10-10-2003 06:09 PM



Advertisments