Results 1 to 2 of 2

Thread: need that value

  1. #1

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    need that value

    Here is what i want to do
    I have a page IssueActions.aspx
    with a label on it lblComm.
    Lets say the value "C.01000" is inside this label.

    I have a user control with a drop down box that I need to fill.
    The problem is one of the parameters to pass to the stored procedure to fill this combo box is the value inside lblComm.

    Two issues I see hear:

    1) The label is not inside the user control but is inside IssueActions.aspx

    2) Even if I try to use a property the IssueActions.aspx page
    never gets its data set while loading this UC. Meaning maybe there isnt enough time to load the user control that it keeps returning nothing.

    How do I somehow pass whatever is inside IssueActions.aspx to this User Control?

    I wish I could do sometihng like

    PARAMETER = IssueActions.lblCommission.Text

    but I cant...

    Anyone with ideas?

    Thanks,

    Jon

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    create a property or method, your choice, on the user control, that takes the same value as lblComm. At the same time that you assign lblComm it's value, send that value over to your user control so it can bind the dropdown to it.
    PHP Code:
    lblComm.Text "C.01000";
    YourUserControlVariable.DataBind"C.01000" ); 
    Since it has something to do with databinding you could overload the DataBind() method with the one above, then in there you'd do your magic to fill the dropdownlist in your usercontrol.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width