Hi,
in a .net web appl (codebehind) when I push a button I want to do javascript
stuff on the CLIENT side and then go on with the codebehind coding of the
button (or maybe another proc) on the SERVER side.
Is that possible? I can't get it to work with doPostback
Thanks
Frank 5 1042
Sub Page_Load()
yourControl.addHandler("eventHander", "clientFunction")
End Sub
"Frank" <fr***@frank.com> wrote in message
news:c8**********@news3.tilbu1.nb.home.nl... Hi,
in a .net web appl (codebehind) when I push a button I want to do
javascript stuff on the CLIENT side and then go on with the codebehind coding of the button (or maybe another proc) on the SERVER side. Is that possible? I can't get it to work with doPostback Thanks Frank
Scott,
I put this in the HTML? So I have two page_loads, one in the HTML and one in
the codebehind?
Frank
"Scott M." <s-***@nospam.nospam> wrote in message
news:#H**************@TK2MSFTNGP10.phx.gbl... Sub Page_Load()
yourControl.addHandler("eventHander", "clientFunction")
End Sub "Frank" <fr***@frank.com> wrote in message news:c8**********@news3.tilbu1.nb.home.nl... Hi,
in a .net web appl (codebehind) when I push a button I want to do javascript stuff on the CLIENT side and then go on with the codebehind coding of
the button (or maybe another proc) on the SERVER side. Is that possible? I can't get it to work with doPostback Thanks Frank
No, your Page_Load should only exist in the codebhind. Since this is server
code and will execute before the final page is rendered, the instruction
here to add a client-side handler will be placed into the resulting HTML
element delivered to the client machine.
"Frank" <fr***@frank.com> wrote in message
news:c8**********@news1.tilbu1.nb.home.nl... Scott, I put this in the HTML? So I have two page_loads, one in the HTML and one
in the codebehind? Frank "Scott M." <s-***@nospam.nospam> wrote in message news:#H**************@TK2MSFTNGP10.phx.gbl... Sub Page_Load()
yourControl.addHandler("eventHander", "clientFunction")
End Sub "Frank" <fr***@frank.com> wrote in message news:c8**********@news3.tilbu1.nb.home.nl... Hi,
in a .net web appl (codebehind) when I push a button I want to do javascript stuff on the CLIENT side and then go on with the codebehind coding of the button (or maybe another proc) on the SERVER side. Is that possible? I can't get it to work with doPostback Thanks Frank
Scott,
that leaves me with the problem that I don't have the method addhandler for
the control. The control is defined as:
Protected WithEvents btnBestel As System.Web.UI.WebControls.Button
Intellisense doesn't show addhandler and putting it there anyway gives an
error.
Greets
Frank
"Scott M." <s-***@nospam.nospam> wrote in message
news:u8**************@TK2MSFTNGP09.phx.gbl... No, your Page_Load should only exist in the codebhind. Since this is
server code and will execute before the final page is rendered, the instruction here to add a client-side handler will be placed into the resulting HTML element delivered to the client machine.
"Frank" <fr***@frank.com> wrote in message news:c8**********@news1.tilbu1.nb.home.nl... Scott, I put this in the HTML? So I have two page_loads, one in the HTML and
one in the codebehind? Frank "Scott M." <s-***@nospam.nospam> wrote in message news:#H**************@TK2MSFTNGP10.phx.gbl... Sub Page_Load()
yourControl.addHandler("eventHander", "clientFunction")
End Sub "Frank" <fr***@frank.com> wrote in message news:c8**********@news3.tilbu1.nb.home.nl... > Hi, > > in a .net web appl (codebehind) when I push a button I want to do javascript > stuff on the CLIENT side and then go on with the codebehind coding
of the > button (or maybe another proc) on the SERVER side. > Is that possible? I can't get it to work with doPostback > Thanks > Frank > >
Sorry Frank, it's
Button.Attributes.Add("onClick", "clientFunction()")
"Frank" <fr***@frank.com> wrote in message
news:c8**********@news2.tilbu1.nb.home.nl... Scott,
that leaves me with the problem that I don't have the method addhandler
for the control. The control is defined as:
Protected WithEvents btnBestel As System.Web.UI.WebControls.Button
Intellisense doesn't show addhandler and putting it there anyway gives an error.
Greets
Frank
"Scott M." <s-***@nospam.nospam> wrote in message news:u8**************@TK2MSFTNGP09.phx.gbl... No, your Page_Load should only exist in the codebhind. Since this is server code and will execute before the final page is rendered, the instruction here to add a client-side handler will be placed into the resulting HTML element delivered to the client machine.
"Frank" <fr***@frank.com> wrote in message news:c8**********@news1.tilbu1.nb.home.nl... Scott, I put this in the HTML? So I have two page_loads, one in the HTML and one in the codebehind? Frank "Scott M." <s-***@nospam.nospam> wrote in message news:#H**************@TK2MSFTNGP10.phx.gbl... > Sub Page_Load() > > yourControl.addHandler("eventHander", "clientFunction") > > End Sub > "Frank" <fr***@frank.com> wrote in message > news:c8**********@news3.tilbu1.nb.home.nl... > > Hi, > > > > in a .net web appl (codebehind) when I push a button I want to do > javascript > > stuff on the CLIENT side and then go on with the codebehind coding of the > > button (or maybe another proc) on the SERVER side. > > Is that possible? I can't get it to work with doPostback > > Thanks > > Frank > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Georg Andersson |
last post by:
Hi
i'm having a little problem of understanding some differences between
Java and PHP.
Well, PHP runs on the server. so, if my script saves some data from a
database to 'c:\temp', it saves the...
|
by: asj |
last post by:
luke: BORRRRRRRRING......the most interesting initiatives are
happening on the client side - in small wireless devices such as
cellphones and smartphones, where J2ME has become the de facto...
|
by: Rea Peleg |
last post by:
Hello
I'd like to use .NET framework namespaces in client side java script.
For example i'd like to import System.Activator, in order to call
Activator.CreateInstance() method inside a client side...
|
by: Christian Wilhelm |
last post by:
Hi!
I'm trying to call a Java WebService out of a .net Client. There are two
Methods, one Method requires one Parameter of type Parameter, the other
Method requires one Parameter of type...
|
by: Robert Baer |
last post by:
I used Google and found some references for integer in Java.
But "int" not only does not work, it also prevents reading X and Y
coordinates of the mouse.
What i would like to do:
1) Get X and Y...
|
by: Jobs |
last post by:
Download the JAVA , .NET and SQL Server interview with answers
Download the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of...
|
by: oll3i |
last post by:
package library.common;
import java.sql.ResultSet;
public interface LibraryInterface {
public ResultSet getBookByAuthor(String author);
public ResultSet getBookByName(String name);
|
by: Ankur |
last post by:
Hi Folks,
I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called...
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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,...
|
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...
|
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,...
|
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...
| |