webuser control not responding to event?

C

Comcast

Newbie to VS.NET so hopefully this is a simple problem ....

I'm desiging a multipage site that has a common banner along the top and
navigation controls down the left side so I read that the thing to do is
have a main.aspx file with the common areas "static" and then have a
PlaceHolder control that you keep switching out webuser controls from
depending upon the state.

So I created my first webuser control, loginForm.ascx. and wrote a
code-behind event handler in the loginForm.ascx.vb to handle the login
button.

In main.aspx I do PlaceHolder.Controls.Add(LoadControl("loginForm.ascx")
to bring in the login form. But, when I click the login button, the button
handler event doesn't break in the debugger and it just seems that nothing
in the loginForm.ascx.vb code behind gets called .... The debugger breaks
next in the OnLoad event of main.aspx.

How do I get the event to fire in the loginForm.ascx.vb !??!

Any thoughts/help would be greatly appreciated. Any suggested web sites,
etc for this type of development would also be appreciated, because again,
newbie here.

Thanks,
Patrick
 
V

Victor Garcia Aprea [MVP]

Hi,

Where exactly are you adding this line?

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top