Lost with User Controls

L

larry

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
 
S

Santhi Maadhaven

Larry,

Add this in aspx file ,
<%@ Register TagPrefix="usercontrol1" TagName="LoginForm"
src="LoginForm.ascx" %> at the top of the file..Above the page directive.
Your user control will work fine..
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top