Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple form ModuleMultiple form Module
Previous
 
Next
New Post
8/4/2006 3:20 AM
 

You get it on:

 CType(objCompaniesControl.FindControl("uxCompaniesDDL"), DropDownList)

because probably you unloaded or loaded-instead of the current control a new one (next one actually)

Try this.. make a public property on the target control (next one) and before loading the control, instantiate it, add the value (from dropdownlist, you should still have it in context) to it's property and then proceed as normal...


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
New Post
8/6/2006 1:06 AM
 

I tried what you suggested, it didn't work or I didn't do something right. I tried another approach. I will try to describe my controls in detail:

In ctlCompanies.ascx.vb (ctlCompanies.ascx contains DDL which is DataBound to the DB table, displays CompanyName, value is CompanyID):

        'declare variable to hold a selected value of DDL
        Dim uxSelectedCompanyID As String

        'when control loads, get the selected value of DDL on DataBound
        Protected Sub uxCompaniesDDL_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles uxCompaniesDDL.DataBound
            uxSelectedCompanyID = uxCompaniesDDL.SelectedValue
        End Sub
       
        'when user chooses a selection from DDL
        Protected Sub uxCompaniesDDL_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles uxCompaniesDDL.SelectedIndexChanged
            uxSelectedCompanyID = uxCompaniesDDL.SelectedValue
        End Sub

        'property to return DDL selected value
        Public ReadOnly Property GetCompanyID() As String
            Get
                Return "-=value is -- " & uxSelectedCompanyID & " =-"
            End Get
        End Property

In ViewForms.ascx.vb (VieForms.ascx holds ctlCompanies.ascx, Label1, and uxShowResearchButton; when button is clicked it should get the selected CompanyID from ctlCompanies control and put it in the label (for now, after I get this part working I will need to pass it to the next form control to display related records):

        Protected Sub uxShowResearchButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles uxShowResearchButton.Click
            Dim objCompanyID As New ctlCompanies
            Label1.Text = "This is the value from ctlCompanies control: " & objCompanyID.GetCompanyID()
        End Sub


The uxSelectedCompanyID holds the value while in the ctlCompanies control, but when I call it from ViewForms control I'm getting empty string. Where am I loosing it?

Thanks,

Waldis

 
New Post
8/21/2006 12:53 AM
 

Did you find a solution to this:

[quote]

Now I have trouble with passing the DDL.SelectedValue to the next control (I can't get the other control to see it).

[/quote]

 
New Post
8/21/2006 3:14 AM
 
Did you read this whole thread? There are several ideas mentioned.

Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple form ModuleMultiple form Module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out