473,387 Members | 2,436 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,387 software developers and data experts.

doPostBack and Object Expected


Hi,

I have developed a user control with two grids (third party product). I am
calling the "__doPostBack" function whenever a row of a control is selected:

__doPostBack(\" + this.ClientID + "_" + grd.ID + "\", \"\"); \n")

The postback occurs, but when the page is reloaded I see the error message
"Object Expected." I think it is because of the first parameter of the
function (eventTarget), but I don't know what to pass, since everything I
tried did not work. It looks like there is a "split" and "join" on a "$" and
":" characters.

Does anyone have any idea on the correct string that I need to pass to
"eventTarget" ?

Thanks.
Mike


Nov 18 '05 #1
2 4164
don't generate the string yourself call:

GetPostBackEventReference()

this also tells .net to generate the client side __doPostBack function.

-- bruce (sqlwork.com)

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...

Hi,

I have developed a user control with two grids (third party product). I am
calling the "__doPostBack" function whenever a row of a control is selected:
__doPostBack(\" + this.ClientID + "_" + grd.ID + "\", \"\"); \n")

The postback occurs, but when the page is reloaded I see the error message
"Object Expected." I think it is because of the first parameter of the
function (eventTarget), but I don't know what to pass, since everything I
tried did not work. It looks like there is a "split" and "join" on a "$" and ":" characters.

Does anyone have any idea on the correct string that I need to pass to
"eventTarget" ?

Thanks.
Mike


Nov 18 '05 #2

It did not help. I still see the same error message and also have a warning
about security issue due to the Postback.

Any other solution?

Thanks.
Mike

"bruce barker" wrote:
don't generate the string yourself call:

GetPostBackEventReference()

this also tells .net to generate the client side __doPostBack function.

-- bruce (sqlwork.com)

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...

Hi,

I have developed a user control with two grids (third party product). I am
calling the "__doPostBack" function whenever a row of a control is

selected:

__doPostBack(\" + this.ClientID + "_" + grd.ID + "\", \"\"); \n")

The postback occurs, but when the page is reloaded I see the error message
"Object Expected." I think it is because of the first parameter of the
function (eventTarget), but I don't know what to pass, since everything I
tried did not work. It looks like there is a "split" and "join" on a "$"

and
":" characters.

Does anyone have any idea on the correct string that I need to pass to
"eventTarget" ?

Thanks.
Mike



Nov 18 '05 #3

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

Similar topics

0
by: valmir cinquini | last post by:
Hi, I've noticed that a doPostBack call always cause the position of the page goes up to the top of the page, after round trip. I'd like to place the page at original position where it was...
0
by: Mike | last post by:
Is there a key that can be used to pass to the Page.IsClientScriptBlockRegistered() to check if the dopostback() function has already been registered to the page? If not any ideas on how to check...
0
by: Matt Petteys | last post by:
I'm using 1.1 framework and IE 6.0. A form within a user control generates the following doPostBack method. The control ID of the form is not a valid javascript variable name, ie...
0
by: jm | last post by:
In my form, datagrid, etc., I have it so when the user enters certain criteria and click the button, the appropriate records return. If the user enters no criteria, all the records return (in a...
3
by: Mad Scientist Jr | last post by:
I have some javascript I would like to run after a doPostBack occurs: onchange="javascript:__doPostBack('Text1','');" The doPostBack is being added dynamically by .NET when it renders the...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
0
by: masoud bayan | last post by:
Hi , I used your suggested code to replace doPostBack in my application, but it seems window.onbeforeunload is called before, window.__doPostBack, so it can not change the condition for showing...
2
by: DSipp | last post by:
First, I am not a developer. My company works with a partner. This partner has a web app that we interact with. All of my systems can connect and login to this site. When we select an issue link,...
6
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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: 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...
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...

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.