Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Cannot pass properties to a UserControl in Button_Click event

Reply
Thread Tools

Cannot pass properties to a UserControl in Button_Click event

 
 
Jenny
Guest
Posts: n/a
 
      08-12-2003
In test.aspx page, I have:
<%@ Reference Control="./user_control/e_multi_choice.ascx" %>

In test.aspx.vb page, I have:

Dim mcFab As e_multi_choice =
CType(LoadControl("./user_control/e_multi_choice.ascx"), e_multi_choice)

CType(mcFab, e_multi_choice).Table = "Table1"

CType(mcFab, e_multi_choice).Caption = "Table 1 Title"

If I put this piece of code in Page_load event, it works fine. However,
if I put it under a Button_Click event, the property value doesn't get
passed.

Please advise. Thank you very much.

Jenny


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Re: Dropdown list is getting cleared after button_click event Phil Winstanley [Microsoft MVP ASP.NET] ASP .Net 0 05-16-2004 09:08 AM
Re: Dropdown list is getting cleared after button_click event Phil Winstanley [Microsoft MVP ASP.NET] ASP .Net 1 05-16-2004 12:06 AM
Dropdown list is getting cleared after button_click event Tim Zych ASP .Net 0 05-15-2004 05:52 PM
Dynamically loaded User Controls - problem with button_click event Tim T ASP .Net 7 11-01-2003 05:44 PM
Button_Click event in user control not firing on page Tim Thomas ASP .Net 3 10-30-2003 09:12 PM



Advertisments