Hi,
I have just started working w/ asp.net, vb.net.
I have a .aspx page that contains user defined controls. Inside these controls, I have a 'Delete' hyperlink.
This is the code:
Inside .ascx file:
<a id="deleteitemid" runat="server">delete</a>
The code behind contains a sub to handle the delete:
Public WithEvents deleteitemid As System.Web.UI.HtmlControls.HtmlAnchor
Sub DeleteItem(ByVal sender As Object, ByVal e As System.EventArgs) Handles deleteitemid.ServerClick
Dim InternetVideoFactory As New meeveelib.core.internetvideo.InternetVideoFactory
InternetVideoFactory.AddRemoveUserFavorite(4, UserSession.UserID, Item.itemid)
Response.Redirect("http://localhost/settings/myFavorites.aspx")
End Sub
When clicking on the delete link, I am getting an 'Object expected' error, from the __doPostBack javascript function (that is generated automatically).
Is it because the event is nested inside the control (it's not in the mai .aspx page) and somehow the main page does not get the refernece to the htmlAnchor correctly.
How to solve this???
Thanks :)