473,387 Members | 1,596 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.

Webcontrol toolbar image click question

Hi all,

Firstly, allow me to just say that programming asp.net AND using viewstate
has been (and still is at the moment) the most painful experience I have
ever undergone. It really is!

Now that I've got that behind me (not that it's going to make viewstate work
for me) I really have a problem I need urgent help with.

I have realized that I need to somehow populate a hidden client-side field
when I click on an image which is on a toolbar control. The reason for this
is because I need to access this variable as soon as my main page page_load
event fires so I can use the Loadcontrol at that stage. Doing it like this
(and not in the button_click event of the toolbox, 'cause it don't work), I
found I can get access to the viewstate.

So please, how can I execute a little Javascript once I click on a
toolbarbutton?

Regards
John.
Nov 17 '05 #1
2 1168
Hi Rory,

The toolber button does not have an attributes property...

Regards
John.

"Rory" <ro**@vivid-design.com.au> wrote in message
news:03****************************@phx.gbl...
You can add attributes to buttons. So use this to add
an 'onclick' attribute to your toolbar button that
executes a jscript.

eg
mybutton.Attributes("OnClick") = "javascript:alert
('hello');"
-----Original Message-----
Hi all,

Firstly, allow me to just say that programming asp.net

AND using viewstate
has been (and still is at the moment) the most painful

experience I have
ever undergone. It really is!

Now that I've got that behind me (not that it's going to

make viewstate work
for me) I really have a problem I need urgent help with.

I have realized that I need to somehow populate a hidden

client-side field
when I click on an image which is on a toolbar control.

The reason for this
is because I need to access this variable as soon as my

main page page_load
event fires so I can use the Loadcontrol at that stage.

Doing it like this
(and not in the button_click event of the toolbox, 'cause

it don't work), I
found I can get access to the viewstate.

So please, how can I execute a little Javascript once I

click on a
toolbarbutton?

Regards
John.
.

Nov 17 '05 #2
If you are experiencing pain programming in asp.net you are definitely doing
something wrong.
and that's the truth.

"John" <a@b.com> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Hi all,

Firstly, allow me to just say that programming asp.net AND using viewstate
has been (and still is at the moment) the most painful experience I have
ever undergone. It really is!

Now that I've got that behind me (not that it's going to make viewstate work for me) I really have a problem I need urgent help with.

I have realized that I need to somehow populate a hidden client-side field
when I click on an image which is on a toolbar control. The reason for this is because I need to access this variable as soon as my main page page_load event fires so I can use the Loadcontrol at that stage. Doing it like this
(and not in the button_click event of the toolbox, 'cause it don't work), I found I can get access to the viewstate.

So please, how can I execute a little Javascript once I click on a
toolbarbutton?

Regards
John.

Nov 17 '05 #3

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

Similar topics

1
by: Jim Mitchell | last post by:
I added a toolbar and then added two images that the user can not click on. I double click on the toolbar in design mode and it does not seem to create any kind of OnClick Event. Can someone...
2
by: Nadav | last post by:
Hi, I am new to WebControls, I have created a WebControl that is used to present an image, the image bing presented is created on runtime, each client side button click causes the image to...
0
by: Novice | last post by:
Hey all, I've already posted this question and two posters offered suggestions and they worked - but now I would like to know why - and if possible the answer to a second question. Here is my...
1
by: Nadav | last post by:
Hi, I am new to WebControls, I have created a WebControl that is used to present an image, the image bing presented is created on runtime, each client side button click causes the image to...
0
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it...
6
by: Mark Denardo | last post by:
My question is similar to one someone posted a few months back, but I don't see any replies. Basically I want to be able to have users upload photos and save them in a database (as byte data)...
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
3
by: vaniKanabathy | last post by:
I had used toolbar to replace button usage in program . I had disable the image button in toolbar but it not displayed in a shaded mode when disabled. How can i do it because i want to differentiate...
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:
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.