Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > UserControls

Reply
Thread Tools

UserControls

 
 
Dani
Guest
Posts: n/a
 
      10-17-2003
hi

First of all: sorry for my bad english

I've got a problem with usercontrols - and no idea how to fix it!

I had registered a usercontrol navigation.ascx in the common-way
(page-directive and declared in aspx-page). This usercontrol has several
linkbuttons in it, who raises click()-events... in this click-event, I set a
property with the name of a second usercontrol.

In the prerender-eventhandler of page I load this second usercontrol
dynamicly with the loadcontrol()-method. this works fine.

my problem is, that i've got an webform in the second usercontrol, and when
i submit this - nothing happens... i've declared an click-event for the
submit-button there, but this event is never running.

funny is, that when i load this usercontrol in the page_load-eventhandler
instead of the onprerender-event all works fine. but i have to load this in
onprerender, because of the linkbuttons-click event in navigation.ascx....

i hope you can help me
dani


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      10-17-2003
The problem is that you can't nest WebForms inside other WebForms, which is
what happens when you put a User Control containing a Web Form inside
another WebForm. In fact, you can't nest HTML forms inside other HTML forms,
so you can't put another form inside your ASPX page, unless it is (1) a
regular HTML form, and (2) it is outside of the WebForm.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Dani" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi
>
> First of all: sorry for my bad english
>
> I've got a problem with usercontrols - and no idea how to fix it!
>
> I had registered a usercontrol navigation.ascx in the common-way
> (page-directive and declared in aspx-page). This usercontrol has several
> linkbuttons in it, who raises click()-events... in this click-event, I set

a
> property with the name of a second usercontrol.
>
> In the prerender-eventhandler of page I load this second usercontrol
> dynamicly with the loadcontrol()-method. this works fine.
>
> my problem is, that i've got an webform in the second usercontrol, and

when
> i submit this - nothing happens... i've declared an click-event for the
> submit-button there, but this event is never running.
>
> funny is, that when i load this usercontrol in the page_load-eventhandler
> instead of the onprerender-event all works fine. but i have to load this

in
> onprerender, because of the linkbuttons-click event in navigation.ascx....
>
> i hope you can help me
> dani
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UserControls on IE MCSD 1 10-29-2003 04:10 PM
Re: Using UserControls in a DLL Jody Fisher ASP .Net 1 07-29-2003 07:30 AM
Validator controls and usercontrols Antonio Maciel ASP .Net 0 07-09-2003 12:34 PM
className Attribute (UserControls) Charles A. Lackman ASP .Net 0 07-08-2003 09:48 PM
After PostBack my UserControls Property doesn't work correct Andreas Klemt ASP .Net 0 07-08-2003 02:58 PM



Advertisments