Solved

Calling a class sub from HTML OnItemDataBound

Posted on 2014-10-16
3
109 Views
Last Modified: 2014-11-13
I have a repeater control in which I call a subroutine using

OnItemDataBound="getNestedMenuData"

Open in new window


in which is:

    Sub getNestedMenuData(ByVal Sender As Object, ByVal e As RepeaterItemEventArgs)
        Dim lblSubYN As New Label
        lblSubYN = e.Item.FindControl("lblSub")       
        'do stuff with e
    End Sub

Open in new window


Is there any way I can do this same thing but call a sub from a class page instead of code behind?
I can't seem to get the value of e to pass.
Example?

TIA
0
Comment
Question by:mwmiller78
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 40391734
Not sure I understand the question. Can you explain and show more code?
0
 

Author Comment

by:mwmiller78
ID: 40397713
Right now I have

OnItemDataBound="getNestedMenuData"

Open in new window


on the HTML side.

Here is the code behind for that page...

    Sub getNestedMenuData(ByVal Sender As Object, ByVal e As RepeaterItemEventArgs)
        GenerateSubMenu(e)
    End Sub

Open in new window


And here is the class page for my application

    Public Sub GenerateSubMenu(ByVal e As RepeaterItemEventArgs)
'do stuff
    End Sub

Open in new window


I'm just trying to eliminate the code behind call and just call what is on the class page from the HTML
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 40412085
If you don't use e within GenerateSubMenu method, you can try replacing

OnItemDataBound="getNestedMenuData"

with

OnItemDataBound="GenerateSubMenu"
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now