473,387 Members | 3,781 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.

How to programmatically register the __DOPOSTBACK script

I'm designing a custom control and I would like to use the __DOPOSTBACK
JavaScript function.
Is there a way to make this function appear other than inserting a dummy
linkbutton inside my custom control?
asp.net controls like linkbutton must use Page.RegisterClientScriptBlock or
something to insert it but what is the key of the script?
Thanks for your help.
Henri

Nov 18 '05 #1
2 2174
You can use Page.GetPostBackClientHyperlink(Control, Argument) which creates
all the necessary stuff (hidden fields and __dopostaback function) and
returns a string that you can assign to an href=""

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Henri" <hm********@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP15.phx.gbl...
I'm designing a custom control and I would like to use the __DOPOSTBACK
JavaScript function.
Is there a way to make this function appear other than inserting a dummy
linkbutton inside my custom control?
asp.net controls like linkbutton must use Page.RegisterClientScriptBlock or something to insert it but what is the key of the script?
Thanks for your help.
Henri

Nov 18 '05 #2
Thanx Karl :-) !!!

Henri

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> a
écrit dans le message de news:e8**************@TK2MSFTNGP15.phx.gbl...
You can use Page.GetPostBackClientHyperlink(Control, Argument) which creates all the necessary stuff (hidden fields and __dopostaback function) and
returns a string that you can assign to an href=""

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Henri" <hm********@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP15.phx.gbl...
I'm designing a custom control and I would like to use the __DOPOSTBACK
JavaScript function.
Is there a way to make this function appear other than inserting a dummy
linkbutton inside my custom control?
asp.net controls like linkbutton must use Page.RegisterClientScriptBlock

or
something to insert it but what is the key of the script?
Thanks for your help.
Henri



Nov 18 '05 #3

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

Similar topics

0
by: Frankieboy | last post by:
Where is __doPostBack-function defined? I've got an application which generates a different __doPostBack-function when the code is being run on the server compared to the one on my laptop. The...
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...
2
by: Mike Dunn | last post by:
I would like to change the name of the _doPostBack function emmitted by the ASP.NET framework to prefix it with an ordinal number i.e. the page should show <script language="javascript"> <!--...
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:...
1
by: Adrian | last post by:
I appear to be losing ViewState information when calling the __doPostBack function. I am attempting to use the showModalDialog to load a new web page which confirms that a user wishes to save a...
0
by: Lance Ahlberg | last post by:
I have a aspx page with a LinkButton running under asp.net 2.0. When I access the page with Internet Explorer the __doPostBack script, __EVENTTARGET, and __EVENTARGUMENT field are present and...
0
by: Granger Godbold | last post by:
This is in regards to the long-standing bug with the colons in the form-id. I'm not satisfied with the main workaround that's been circulating: http://www.asp.net/Forums/ShowPost.aspx?PostID=191953...
0
by: Jim O'Neill | last post by:
Hi. I am having an issue when I repeatedly refresh a aspx page/cms posting quickly. Normally when I view the posting the following is included, see below However when I repeatedly refresh...
4
by: BentleyInc | last post by:
I'm trying to find a way to add a whildcard application mapping to aspnet_isapi.dll in IIS programmatically.... been looking into IIS administrator reference but didn't find the right function to...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.