all groups > asp.net building controls > july 2003 >
You're in the

asp.net building controls

group:

webuser control not responding to event?



webuser control not responding to event? Comcast
7/31/2003 10:25:29 PM
asp.net building controls: 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

Re: webuser control not responding to event? Victor Garcia Aprea [MVP]
8/4/2003 1:18:55 AM
Hi,

[quoted text, click to view]

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.
[quoted text, click to view]

Re: webuser control not responding to event? Ron White
8/7/2003 3:43:41 PM

I'm not sure what your problem is but there is an excelent example of a
multi-part form on the visualstudiomagazine.com site
http://www.ftponline.com/vsm/2003_04/magazine/columns/aspnet/

I used it and it is excelent.


*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button