Problem with user control on ASP.Net web page.

I have created a user control with a gridview on it and I am trying to add this control to a web form and it is not recognizing the user control. I have Registered the control on the page im trying to add it but it still doesn't seem to recognize it. Any suggestions on what I could be doing wrong? I have added a few pics so you can see what I have set up. Any questions just let me know. Thanks for your help
UserControl.png
UserControl-on-web-form.png
jknj72Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun KlineLead Software EngineerCommented:
Does your Test.aspx page exist in the parent folder of your UserControls folder? If not, try changing your user control source property on Test.aspx to "~/UserControls/DSgridview.ascx"
0
jknj72Author Commented:
The Test.aspx is in the root and on the root there is a folder called UserControls, where the control DSgridview resides, and I have tried both ways of trying to register the control on the form, with the

<%@ Register TagPrefix="uc1" TagName="DSgridview" Src="~/UserControls/DSgridview.ascx" %>

and without

<%@ Register TagPrefix="uc1" TagName="DSgridview" Src="UserControls/DSgridview.ascx" %>

and neither have worked for me. The intellisense comes up but with no uc1:DSgridview in the list. Im missing something here... Is there anything else I should check out?
0
Navoneel TalukdarCommented:
Check the path of your user control carefully.
0
Alexandre SimõesManager / Technology SpecialistCommented:
That's a green underline which means that it's just a warning.
In fact, the control is being well rendered, we can see it on the second screenshot.

My guts tell me that it's because you're declaring your usercontrol as a container DOM element.
Try to declare it like as a self-closing tag:
<uc1:DSgridview ID="DSgridview1" runat="server" />

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jknj72Author Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.