locked
Odd .ddl Reference Behavior... RRS feed

  • Question

  • User317614295 posted

    Hi,

     I have my web project referencing my own .dll (the .dll also services a desktop program).  I have a class called Subcategory and a function in it called Populate which has a +1 overload.  I call on that function no problem from the desktop program and it used to work for my web project.  However, recently I've been trying to run my page that calls on that function and it says that the function cannot be found.  Once, when I stepped through the program, it seemed to "find" the path and worked for a little, but then went right back to the old behavior.  Now, I can't even step through it, it just throws the error.  Any ideas what the hell is going on?!  The function is public and correctly referenced and called upon.

     TIA,
    Matt

     

    1    Page Code:
    2    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    3        Dim wc As New MicuWebControl
    4        Title = wc.GetCategoryDescriptionByID(Request("cid"), Context)
    5        fillTitle.InnerHtml = Title
    6        fillLocation.InnerHtml = "<a href=""Default.aspx"">Home</a> > " + fillTitle.InnerHtml
    7        Dim s As New Subcategory
    8        fillContent.InnerHtml = GetSubcatHTML(s.Populate(Request("cid")))
    9    End Sub
    10   
    11   .dll code:
    12   Public Overloads Function Populate() As DataSet
    13       Dim cmd As New SqlCommand
    14       cmd.CommandText = "sp_LoadAllSub"
    15       cmd.CommandType = CommandType.StoredProcedure
    16       Dim df As New DataFunctions
    17       Return df.PopulateDataset(cmd)
    18   End Function
    19   
    20   Public Overloads Function Populate(ByVal catID As Integer) As DataSet
    21       Dim cmd As New SqlCommand
    22       cmd.CommandText = "sp_LoadSubByCatID"
    23       cmd.CommandType = CommandType.StoredProcedure
    24       cmd.Parameters.Add("@catID", SqlDbType.Int).Value = catID
    25       Dim df As New DataFunctions
    26       Return df.PopulateDataset(cmd)
    27   End Function
    
     
    Saturday, August 16, 2008 10:53 AM

All replies

  • User-417784260 posted
    You dont want the code to run if the web page is posting back 
    2    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
              If not ispostback then
    3 Dim wc As New MicuWebControl
    4 Title = wc.GetCategoryDescriptionByID(Request("cid"), Context)
    5 fillTitle.InnerHtml = Title
    6 fillLocation.InnerHtml = "<a href=""Default.aspx"">Home</a> > " + fillTitle.InnerHtml
    7 Dim s As New Subcategory
    8 fillContent.InnerHtml = GetSubcatHTML(s.Populate(Request("cid")))
              End if 
    9    End Sub

    Saturday, August 16, 2008 11:52 AM
  • User317614295 posted

    Though that's true, that doesn't solve my problem.

    Saturday, August 16, 2008 11:59 AM