Debugging ascx pages


I am working with the dnn gallery which consists of a number of ascx pages and vb code behind pages.  I want to debug the gallery as a standalone application without first uploading to dotnetnuke as doing this removes the code behind files.  How would I do this?  Would I set up a button in an aspx page and call the gallery methods in the button click event?  Not quite sure how to do this.  

Hope someone can help.

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.

Yes I would make a test aspx page on your local machine and implement your custom control on that, in order to test.

mitesh114Author Commented:
so do I just add an aspx page to the solution?

Add the aspx page.

you need the line right at the top of the page to register your custom tag and implement it. like so:

<%@ Register TagPrefix="ARDesigns" TagName="ICaptcha" Src="CAPTCHA.ascx" %>

then use your tag, here is an example of a web control I made:

<ARDesigns:ICaptcha ID="Secure1" runat="server" />
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

or you could load it in the backend and put a placeholder on the page

Control ct = LoadControl("Modules/ModuleAdmin/ModuleAdmin.ascx");

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
whityum,  nice

I will now use that myself in some projects, very useful indeed

Andrew :-)
mitesh114Author Commented:
What do you mean load it in the backend?
whityum  means, you add a place holder to your page and simply create a control using the LoadControl method which you supply your address to your web control.  This is rendered as a control and added to your place holder. I assume avoiding the need to register the custom tag.  Very handy indeed.

Again good code whityum
the "code behind" page is what I meant, or on a server side script tag.
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

From novice to tech pro — start learning today.