locked
Calling a Sub from usercontrol to class vb file not working RRS feed

  • Question

  • User1142184950 posted

    If someone can help me, I would greatly appreciate it

     I have a Sub that I created in a class file AKA my DAL.  The class file is located in a folder in my project as MetricsDAL.StoreDAL

     I have a usercontrol called DailyView.ascx.  At the top I make sure to "Import MetricsDAL"  I also tried "Import MetricsDAL.StoreDAL" but either way it doesn't work.

     So down below in my DailyView.ascx I set the object as "Dim myMetricsDal as New MetricsDAL.StoreDAL"  <- which is the actual page where my sub resides.

    Then I say "Call myMetricsDal. xxxx "  and it doesn't show up in the list, or if I type it in as "FillGrid3" it does not exist in "StoreDAL" yet I see it sitting in there ready to go!

     What am I doing wrong?

    Essentially I want a Sub that does a database call, get values, then pass it to the DailyView page where I will assign to different Labels.  But not working

    Help of guidance please?

     

    B

    Thursday, June 26, 2008 10:33 AM

Answers

  • User1142184950 posted

    not sure if this helps....but.......heres what I did.  I created a new Class.vb file in the App_Code folder.  I created that class and added that Sub to it.  Did the SAME routine and it works.  Now, the other MetricsDal folder has a vbproj file in it.  does that matter?  It has MetricsDal.vbproj and the file class file StoreDal.vb, so it looks like I need to get that solution and get it up on my pc.  I think so that the DAL has it's own .dll for ease of changes.  So basically i was missing my solution for this as I did not set it up.  Now I have the solution, can update it, and it works.

     ugh!

     

    Crazy!

     

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 26, 2008 11:22 AM