Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Web User Control...I'm missing something basic

Reply
Thread Tools

Web User Control...I'm missing something basic

 
 
YYZ
Guest
Posts: n/a
 
      11-08-2006
I am trying to add 5 "Web User Controls" for use on one WebForm. My
idea was to take kind of a wizard approach -- show uc1 and hide the the
other 4...then next run of the page, show uc2 and hide the other 4.
So, I have created 5 usercontrols in my project (ASP.Net using VB and
using VS2003) by right clicking the project and choose "Add Web User
Control".

After I do that, I was expecting to see the 5 usercontrols listed in
the toolbox under "My User Controls" but they aren't. That may be the
real symptom of my problem.

But, to get around that, I just dragged the usercontrol from the
Solution Explorer and dropped it onto my WebForm1 page. It shows up,
but it shows up kind of like a definition, not an object. It is a gray
rectangle with "UserControl - UcPage11" shown (the original name of the
uc is ucPage1). I can't resize it, etc.

I also can't reference the usercontrol in code for the page itself.
UcPage11.visible = True results in UcPage11 being underlined in blue,
meaning that the compiler doesn't know what UcPage11 is.

So, if I change it to ucPage1.Visible = True then it tells me that I
must use an instance of the control, not the definition.

I know that I need to instantiate an instance of ucPage1, but how do I
do that? I know it's probably something stupid, but I can't figure out
what I'm doing wrong.

Obviously, I'm very new to ASP.Net, so if there is a better way to do
this, I'm open to suggestions.

Thanks for any and all help.

Matt

 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      11-08-2006
I suggest you use the ASP.NET 2.0 Wizard control to dramatically simplify
your design.

Here's more info:
http://msdn.microsoft.com/msdnmag/is...1/CuttingEdge/

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net


"YYZ" <> wrote in message
news: oups.com...
>I am trying to add 5 "Web User Controls" for use on one WebForm. My
> idea was to take kind of a wizard approach -- show uc1 and hide the the
> other 4...then next run of the page, show uc2 and hide the other 4.
> So, I have created 5 usercontrols in my project (ASP.Net using VB and
> using VS2003) by right clicking the project and choose "Add Web User
> Control".
>
> After I do that, I was expecting to see the 5 usercontrols listed in
> the toolbox under "My User Controls" but they aren't. That may be the
> real symptom of my problem.
>
> But, to get around that, I just dragged the usercontrol from the
> Solution Explorer and dropped it onto my WebForm1 page. It shows up,
> but it shows up kind of like a definition, not an object. It is a gray
> rectangle with "UserControl - UcPage11" shown (the original name of the
> uc is ucPage1). I can't resize it, etc.
>
> I also can't reference the usercontrol in code for the page itself.
> UcPage11.visible = True results in UcPage11 being underlined in blue,
> meaning that the compiler doesn't know what UcPage11 is.
>
> So, if I change it to ucPage1.Visible = True then it tells me that I
> must use an instance of the control, not the definition.
>
> I know that I need to instantiate an instance of ucPage1, but how do I
> do that? I know it's probably something stupid, but I can't figure out
> what I'm doing wrong.
>
> Obviously, I'm very new to ASP.Net, so if there is a better way to do
> this, I'm open to suggestions.
>
> Thanks for any and all help.
>
> Matt
>



 
Reply With Quote
 
 
 
 
YYZ
Guest
Posts: n/a
 
      11-08-2006
On Nov 8, 12:34 pm, "Steve C. Orr [MVP, MCSD]" <S...@Orr.net> wrote:
> I suggest you use the ASP.NET 2.0 Wizard control to dramatically simplify
> your design.
>
> Here's more info:http://msdn.microsoft.com/msdnmag/is...1/CuttingEdge/


Thanks Steve, but I'm using .Net 2003, and I don't think that gets me
the 2.0 version of anything, does it?

Matt

 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      11-08-2006
No, but it's a great reason to upgrade!


--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net


"YYZ" <> wrote in message
news: oups.com...
> On Nov 8, 12:34 pm, "Steve C. Orr [MVP, MCSD]" <S...@Orr.net> wrote:
>> I suggest you use the ASP.NET 2.0 Wizard control to dramatically simplify
>> your design.
>>
>> Here's more
>> info:http://msdn.microsoft.com/msdnmag/is...1/CuttingEdge/

>
> Thanks Steve, but I'm using .Net 2003, and I don't think that gets me
> the 2.0 version of anything, does it?
>
> Matt
>



 
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
Help missing something BASIC Don Norcott Ruby 10 10-21-2010 07:55 AM
Crystal Reports - Visual Basic UFL that implements this function is missing (or U2lcom.dll is missing) Les Caudle ASP .Net 3 09-03-2007 02:27 AM
ASP.NET User Controls - missing something small? mivhaelveloz ASP .Net 0 05-01-2006 12:38 PM
Forms authentication across apps - missing something basic? Geoff Pennington ASP .Net Security 6 10-13-2005 12:04 PM
User changing something on a form makes asp.net take user to login page Raj ASP .Net Security 0 07-09-2003 11:13 PM



Advertisments