Referencing to .ascx

T

Tomas Kepic

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 ASP:pLACEHOLDER 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
 
G

Galin Iliev

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
 
T

Tomas Kepic

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top