473,385 Members | 1,492 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,385 software developers and data experts.

Can't find Item property inside databound event (Whidbey)

Hi there,

I am using ASP.NET 2.0 and need multiple parameters in Hyperlink column so I
add this to my DataGridView:

<asp:TemplateField>
<ItemTemplate><asp:Hyperlink text="Edit" id="hylEdit"
runat="server"></asp:Hyperlink></ItemTemplate>
</asp:TemplateField>

Now in the DataBound event I need to find the Hyperlink object in order to
set the NavigateUrl property. I found this example on the web (for ASP.NET
1.x):

HyperLink obj = ((HyperLink)(e.Item.FindControl("hylEdit")));

However, I get a 'System.EventArgs' does not contain a definition for 'Item'
error. How can I get this to work in ASP.NET 2.0? Now, if there is a better
solution for my original problem using Whidbey, I would be even happier. :)

Thanks in advance,

-Benton

Nov 19 '05 #1
0 925

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

Similar topics

2
by: Stephen Miller | last post by:
When I dynamically populate a HtmlSelect combo box, the Value property consistently fails to return the item selected, defaulting instead to the first item in the list. For example: Protected...
1
by: bill yeager | last post by:
I have a datagrid control within a datalist control. When I try and do a "Find" on the control, the object comes back with nothing and then my pgm crashes. I am 100% sure that my datagird inside...
0
by: RyanG | last post by:
when the value that determines the filter is databound?? I am trying to make a DropDownList for a set of data that I use a lot throughout my project. So I extended the DropDownList to retrieve...
3
by: Tim::.. | last post by:
I keep getting the following error when trying to do the following! 'DataBinding' is not an event of 'System.Web.UI.WebControls.HyperLinkColumn'. How do I get the value Name into the...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.