473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

What Does This Mean?

I have an ASP.NET page in which I include a datalist that is bound to a
datareader. I am trying to use the OnItemDataBound event to change the
contents of the NavigateURL property of a hyperlink. I am getting an error I
do not understand. Any explinations woul;d be appreciated. The error report
is:

Compiler Error Message: BC30408: Method 'Public Sub
ItemDataBoundEventHandler(sender As Object, e As
System.Web.UI.WebControls.DataGridItemEventArgs)' does not have the same
signature as delegate 'Delegate Sub DataListItemEventHandler(sender As
Object, e As System.Web.UI.WebControls.DataListItemEventArgs)'.

Source Error:
Line 68: Judge/Caption for Evaluation</asp:Label>
Line 69: <p>
Line 70: <asp:DataList id="judgelist" runat="server"
onitemdatabound="ItemDataBoundEventHandler">
Line 71: <HeaderTemplate>
Line 72: <table width="90%">
================================================== ==================
The relevant DataList Code is as follows:

<asp:DataList id="judgelist" runat="server"
onitemdatabound="ItemDataBoundEventHandler">
<HeaderTemplate>
<table width="90%">
<tr bgcolor="#b0c4de">
<th>
Action</th>
<th>
Judge</th>
<th>
Caption</th>
<th align="center">
Proposed<br />
Status</th>
</HeaderTemplate>
<ItemTemplate>
<tr bgcolor="lightcyan">
<td id="myLink" runat="server">
<asp:HyperLink id="XX" runat="server"
NavigateUrl= strLink Text= "Evaluate" ></asp:HyperLink>
</td>
<td>
<%#Container.DataItem("JudgeName")%>
</td>
..............

The "ItemDataBoundEventHandler" code is as follows:

Sub ItemDataBoundEventHandler(sender as Object, e as DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item OR _
e.Item.ItemType = ListItemType.AlternatingItem then
'Check to see if the price is below a certain threshold
Dim strLink as String
strLink = Convert.ToDouble(DataBinder.Eval(e.Item.DataItem,
"price"))

If DataBinder.Eval(e.Item.DataItem, "proposedstatus") Is
DBNull.Value then
strLink = ""
End If
End If
End Sub
Nov 18 '05 #1
2 999
Jos
Wayne Wengert wrote:
I have an ASP.NET page in which I include a datalist that is bound to
a datareader. I am trying to use the OnItemDataBound event to change
the contents of the NavigateURL property of a hyperlink. I am getting
an error I do not understand. Any explinations woul;d be appreciated.
The error report is:

Compiler Error Message: BC30408: Method 'Public Sub
ItemDataBoundEventHandler(sender As Object, e As
System.Web.UI.WebControls.DataGridItemEventArgs)' does not have the
same signature as delegate 'Delegate Sub
DataListItemEventHandler(sender As Object, e As
System.Web.UI.WebControls.DataListItemEventArgs)'.


Probably a Copy/Paste mistake:
just change DataGridItemEventArgs into DataListItemEventArgs.

--

Jos
Nov 18 '05 #2
Thank Joe. As you said, a dumb copy mistake!!

Wayne

"Jos" <jo***************@fastmail.fm> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Wayne Wengert wrote:
I have an ASP.NET page in which I include a datalist that is bound to
a datareader. I am trying to use the OnItemDataBound event to change
the contents of the NavigateURL property of a hyperlink. I am getting
an error I do not understand. Any explinations woul;d be appreciated.
The error report is:

Compiler Error Message: BC30408: Method 'Public Sub
ItemDataBoundEventHandler(sender As Object, e As
System.Web.UI.WebControls.DataGridItemEventArgs)' does not have the
same signature as delegate 'Delegate Sub
DataListItemEventHandler(sender As Object, e As
System.Web.UI.WebControls.DataListItemEventArgs)'.


Probably a Copy/Paste mistake:
just change DataGridItemEventArgs into DataListItemEventArgs.

--

Jos

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
86
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that:...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
2
by: Steve Richter | last post by:
What does the "." mean in the following sql script stmts? use GO if exists (select * from dbo.sysobjects where id = object_id(N'.') and OBJECTPROPERTY(id,N'IsUserTable') = 1) drop table ....
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
51
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
1
by: Frank Rizzo | last post by:
Some of the classes in the framework are marked as thread-safe in the documentation. In particular the docs say the following: "Any public static (*Shared* in Visual Basic) members of this type...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
9
by: JoeC | last post by:
m_iWidth = (int)pBitmapInfo->bmiHeader.biWidth; m_iHeight = (int)pBitmapInfo->bmiHeader.biHeight; What does this mean? I have seen v=&var->member.thing; but what does it mean when you...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.