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.0IDE error: calling a function from ascxIDE error: calling a function from ascx
Previous
 
Next
New Post
12/28/2006 8:03 PM
 

I've cut and pasted and fixed lots of code from a vs2003 app to vs2005. One problem remains:

In my test.ascx web form I call a function. For example: 

<asp:repeater id="rptLetterSearch" runat="server">
   <ItemTemplate>
      <asp:HyperLink ID="HyperLink1" runat="server" 
      NavigateUrl="<%# FilterURL(Container.DataItem) %>" 
      Text="<%# Container.DataItem %>" >
      </asp:HyperLink>
   </ItemTemplate>
</
asp:repeater>

 

test.ascx.vb has the function:

 Protected Function FilterURL(ByVal Filter As String) As String
         Return NavigateURL(TabId) & URLConnect() & "txtFind=" & Filter
End Function

The code compiles and runs fine.
Yet vs2005 gives me an error on the test.ascx file:   Name 'FilterURL' is not declared

Ideas?

 

 

 
New Post
12/29/2006 8:36 AM
 

That same syntax, particularly the use of Protected rather than Public scope on the method defined in the CodeFile has been working fine for me in VS2005.  I'd check your @Control directive and make sure that the Inherits attribute has exactly the same, fully qualified namespacing as that of the CodeFile. The module template from the Starter Kit does not automatically provide the namespacing pattern that I like to use. For example, from a module I'm currently working on:

< %@ Control language="vb" Inherits="WESNet.DNN.Modules.EPrayer.EPrayer" CodeFile="EPrayer.ascx.vb" AutoEventWireup="false" Explicit="True" % >

and in the Code file:

Namespace

WESNet.DNN.Modules.EPrayer
   
Partial Class EPrayer
   

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0IDE error: calling a function from ascxIDE error: calling a function from ascx


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