hey all,
i have a datagrid with checkboxes on it and i was wondering if i can do the
following:
if a user clicks on the checkbox it makes a server-side button visible.
can i make this happen on the client side without posting back?
thanks,
rodchar 5 1922
"=?Utf-8?B?cm9kY2hhcg==?=" <ro*****@discussions.microsoft.com> wrote in
news:3C**********************************@microsof t.com: i have a datagrid with checkboxes on it and i was wondering if i can do the following: if a user clicks on the checkbox it makes a server-side button visible.
can i make this happen on the client side without posting back?
No, if you make a button NOT visible on the server side, the button is not
outputted in the HTML.
If you wish to hide the button and allow clientside script to access it,
use DHTML on the serverside to hide the button.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Newmarket Volvo Sucks! http://newmarketvolvo.tripod.com
On Mon, 26 Sep 2005 17:14:50 +0000, Lucas Tam wrote: "=?Utf-8?B?cm9kY2hhcg==?=" <ro*****@discussions.microsoft.com> wrote in news:3C**********************************@microsof t.com:
i have a datagrid with checkboxes on it and i was wondering if i can do the following: if a user clicks on the checkbox it makes a server-side button visible.
can i make this happen on the client side without posting back?
No, if you make a button NOT visible on the server side, the button is not outputted in the HTML.
If you wish to hide the button and allow clientside script to access it, use DHTML on the serverside to hide the button.
The last phrase is bound to be confusing; there is NO DHTML serverside.
What need to be done is assure that the button is is always output to the
client (this is done via setting visible at the server), then at the
client locate the button via the id assigned to it, then hide/show as
desired.
how do i locate button and hide/show?
"intrader" wrote: On Mon, 26 Sep 2005 17:14:50 +0000, Lucas Tam wrote:
"=?Utf-8?B?cm9kY2hhcg==?=" <ro*****@discussions.microsoft.com> wrote in news:3C**********************************@microsof t.com:
i have a datagrid with checkboxes on it and i was wondering if i can do the following: if a user clicks on the checkbox it makes a server-side button visible.
can i make this happen on the client side without posting back?
No, if you make a button NOT visible on the server side, the button is not outputted in the HTML.
If you wish to hide the button and allow clientside script to access it, use DHTML on the serverside to hide the button. The last phrase is bound to be confusing; there is NO DHTML serverside. What need to be done is assure that the button is is always output to the client (this is done via setting visible at the server), then at the client locate the button via the id assigned to it, then hide/show as desired.
As Lucas pointd out, don't use buttonName.Visible = false on the server side
to hide the button. On the client side, use javascript to hide/show this
button, something like pageName.buttonName.style.visibility='hidden'
Regards,
Ryan
"rodchar" wrote: how do i locate button and hide/show?
"intrader" wrote:
On Mon, 26 Sep 2005 17:14:50 +0000, Lucas Tam wrote:
"=?Utf-8?B?cm9kY2hhcg==?=" <ro*****@discussions.microsoft.com> wrote in news:3C**********************************@microsof t.com:
> i have a datagrid with checkboxes on it and i was wondering if i can > do the following: > if a user clicks on the checkbox it makes a server-side button > visible. > > can i make this happen on the client side without posting back?
No, if you make a button NOT visible on the server side, the button is not outputted in the HTML.
If you wish to hide the button and allow clientside script to access it, use DHTML on the serverside to hide the button. The last phrase is bound to be confusing; there is NO DHTML serverside. What need to be done is assure that the button is is always output to the client (this is done via setting visible at the server), then at the client locate the button via the id assigned to it, then hide/show as desired.
On Mon, 26 Sep 2005 13:24:03 -0700, Ryan Luan wrote: As Lucas pointd out, don't use buttonName.Visible = false on the server side to hide the button. On the client side, use javascript to hide/show this button, something like pageName.buttonName.style.visibility='hidden'
Regards, Ryan
"rodchar" wrote:
how do i locate button and hide/show?
"intrader" wrote:
> On Mon, 26 Sep 2005 17:14:50 +0000, Lucas Tam wrote: > > > "=?Utf-8?B?cm9kY2hhcg==?=" <ro*****@discussions.microsoft.com> wrote in > > news:3C**********************************@microsof t.com: > > > >> i have a datagrid with checkboxes on it and i was wondering if i can > >> do the following: > >> if a user clicks on the checkbox it makes a server-side button > >> visible. > >> > >> can i make this happen on the client side without posting back? > > > > No, if you make a button NOT visible on the server side, the button is not > > outputted in the HTML. > > > > If you wish to hide the button and allow clientside script to access it, > > use DHTML on the serverside to hide the button. > The last phrase is bound to be confusing; there is NO DHTML serverside. > What need to be done is assure that the button is is always output to the > client (this is done via setting visible at the server), then at the > client locate the button via the id assigned to it, then hide/show as > desired. > >
Ryan Luan has given you the code to hide/show. The code to determine the
buttonName is based on the ClientID (the id assigned at the server to the
button at the client). By the way don't confuse ClientID with the ID
attibute used in the server; these are distinct. It also gets a little
more confusing if you consider that each button will have a UniqueID (a
hierarchically-qualified ID for the control); this is so that the all
controls have unique names!. Now the 'buttonName' can be determined as
easy as 'this.ID' (at the server).
I hope that I have not confused the issue! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kathryn |
last post by:
Hiya
I have a problem with using some client side and server side scripting
together in an ASP. I'm using VBScript.
What I'm trying to achieve is this -
- Page loads up and some server side...
|
by: Tom Leylan |
last post by:
(I posted this in languages.vb also... I can't figure out where things go if
you use a little of a lot of things)
Hi all... I'm looking for an example (or a pointer to one) related to the...
|
by: Dicky Cheng |
last post by:
Hi,
I am using .net remoting technology. I set up a .net remoting client and
server in IIS. When the client calls the server, the server will run a long
duration method (30-60seconds). I have a...
|
by: cjl |
last post by:
Hey all:
I know that it is silly in the age of Google to 'lose' something on the
internet, but I recently checked out a project that had implemented a
database with a subset of SQL in pure...
|
by: Ken Allen |
last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other
languages and done some COM work for a number of years. I am attempting to
understand how to map an older program...
|
by: |
last post by:
Hello Guys,
I am using the validation controls to validate my data.
But the problem is "The page is still being posted to
server".
I want to get rid of the round trips to server. Are there...
|
by: Matt |
last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or
Client-Side form validation? Since I think each validator control can select
either 1) JavaScript based error dialog or 2)...
|
by: Valerian John |
last post by:
I have a ListBox webcontrol on an aspx page. Items are added to the
ListBox using client-side code. However, when the page is posted back the
items are missing/not available. (It is like the...
|
by: Ben |
last post by:
Hi,
I made an application in classic asp (reservation of books and video stuffs
for students) and want to migrate to asp.net.
The user has to chose a date, then pushung on a submit button. The...
|
by: Simon Brooke |
last post by:
I've been doing XSL transforms, converting XML to HTML, server side since
2000. In those days, clients which could do the transformation client
side didn't exist, so whether to transform...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |