WebUserControl Events & Properties?

T

Terry Olsen

In an effort to create a QueryBuilder for a web page, I've created a
WebUserControl. It can be seen here:
http://boycot.no-ip.com/images/querybuilder.jpg

I load one control initially in the Page_Load using this code:
QueryBuilderPlaceHolder.Controls.Add(LoadControl("QueryBuilder.ascx"))

I would like to have a callback routine on the main page for events such as
when the user changes the "And/Or" DropDownList. If the user changed it to
"And" or "Or" then I'd load another control. If the user changed it to
Nothing, then I'd remove the next control.

I created a public event (Public Event AndOrChange(ByVal AndOr As String))
in the WebUserControl and then Raised it (RaiseEvent
AndOrChange(ddlAndOr.Text)) in the DropDownList_SelectedIndexChanged
routine.

However, the event is not visible in the main web page.

I'd also like to be able to read the QueryString segment from each control
via a property.

I need advice. Am I on the right course? Or is there a better way?

Thanks.
 

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

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top