473,465 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

__doPostBack Object expected error

1 New Member
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 :)
Mar 25 '07 #1
0 2909

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: paul reed | last post by:
Hello, I am having some weird behavior between two machines...one which is running the 1.1 framework and one which is running 1.0. After opening a child form from a parent...I update the...
3
by: E | last post by:
I have 2 aspx pages... neither of which do anything out of the ordinary. One of the pages automatically generates this block of code when viewed at the client:...
3
by: Nikhil Patel | last post by:
Hi all, I have developed a web page with a sortable DataGrid with Select button column in ASP.Net. It works fine in inernet explorer. The purpose of the web page is to display it in a third party...
3
by: Marcelo | last post by:
Hello, I am trying to create a postback event, and it is working, just not calling the sub. I have a datagrid which has <asp:DataGrid id="Mensajes" ... <Columns> <asp:HyperLinkColumn ....
0
by: Garry Weston | last post by:
I have several forms in a web application the allow the user to hit the press the enter button and cause a postback. I have the following javascript handling the key press if the key code is 13: ...
1
by: B Ekre | last post by:
In VS 2005 I have a WebForm with 3 UserControls on it. One UserControl implements the new ICallbackEventHandler to update a DIV based on user input. The other two implement a <asp:repeater ...>...
2
by: SteveSu | last post by:
Hi! I want to make a postback when the user hits the escape-button on the keyboard and redirect the user to another page. But the response.redirect does not work for me in this "context". I´m...
0
by: Kavitha N via DotNetMonster.com | last post by:
I have 2 frames in my web page. The top frame is just a jscript file which contains the menu items. The bottom frame changes based on the selected menu. I have added this piece of code in my top...
3
by: Smokey Grindel | last post by:
I have a page with no ASP.NET controls on it put I have links that use the __doPostBack('','') javascript method on it, it wont work, oh course I know why, the script isnt registered.. because if...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.