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

client side

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
Nov 19 '05 #1
5 1923
"=?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
Nov 19 '05 #2
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.

Nov 19 '05 #3
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.

Nov 19 '05 #4
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.

Nov 19 '05 #5
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!

Nov 19 '05 #6

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

Similar topics

9
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...
11
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...
2
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...
18
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...
6
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...
4
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...
14
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)...
6
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...
10
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...
3
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
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)...
1
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....
0
isladogs
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...

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.