all groups > asp.net webcontrols > november 2005 >
You're in the

asp.net webcontrols

group:

Lost with User Controls


Lost with User Controls larry
11/30/2005 1:41:55 PM
asp.net webcontrols:
Hi,

I'm a newbie to ASP.NET.
I'm having difficulty create user controls in Visual Studio.NET. I
have tried to use the User Control template provided by Visual
Studio.NET but the intellisense won't let me use basic UI controls.

So far to create User Controls, I have been creating web forms and
saving them as .ascx files. I'd like to be able to User Control
template provided by Visual Studio to accomplish the task.

I don't know how to integrate the user controls into Web Forms in
Visual Studio.
All the exaples I have seen online don't have any includes, but Visual
Studio
automatically creates the following code.

Public Class XXXX
Inherits System.Web.UI.Page

and when I try to set up the page to include the user control,
intellisense doesn't include any controls, including the script tag

I don't know where to put the text which registers the the User Control
(i.e.)
<% Register TagPrefix="usercontrol1" TagName="LoginForm"
src="LoginForm.ascx" %>

I"m really lost and frustrated here. I'd really appreciate if someone
could tell me the syntax of how to integrate a user control in a web
form.

Thanks,
Larry


Sincerely,
Larry
I want to use Visual Studio 3.0 to accomplish this task, but the user
control template doesn't allow for basic UI controls
RE: Lost with User Controls Santhi Maadhaven
12/1/2005 9:31:03 AM
Larry,

Add this in aspx file ,
<%@ Register TagPrefix="usercontrol1" TagName="LoginForm"
[quoted text, click to view]
Your user control will work fine..

[quoted text, click to view]
AddThis Social Bookmark Button