Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to add client script to a pushbutton in datagrid

Reply
Thread Tools

How to add client script to a pushbutton in datagrid

 
 
VancouverMike
Guest
Posts: n/a
 
      03-21-2006
Hi there,

I am using a datagrid in my asp.net web app to show a user list. I put a
pushbutton (could be linkbutton as well) for each row in the grid. I would
like to have a javascript function linked to each button, so when user clicks
the button, another pupup window shows up to show an image of the selected
user in the list. I am looking for a way to add client side javascript
function to each button and passing the each user's key to the function.

Thanks in advance.
Mike

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-21-2006
VancouverMike wrote:
> Hi there,
>
> I am using a datagrid in my asp.net web app


There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

> to show a user list. I
> put a pushbutton (could be linkbutton as well) for each row in the
> grid. I would like to have a javascript function linked to each
> button, so when user clicks the button, another pupup window shows up
> to show an image of the selected user in the list. I am looking for a
> way to add client side javascript function to each button and passing
> the each user's key to the function.
>

Use Attributes.Add to add clientside properties to server-side controls.
You would probably need to do this in the grid's ItemCreated event.See the
dotnet group for more details.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      03-22-2006
Hi Mike,

Thank you for posting. I have seen your new thread posted in the ASP.NET
specific newsgroup.

Subject: How to add client script to a pushbutton in datagrid
Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls

I have also posted my suggestion in that thread. If you feel it convenient
that we continue to discuss in that thread(since this is a pure ASP.NET
issue), please feel free to followup there.

Thanks for your understanding.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may

learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to add client script to a pushbutton in datagrid VancouverMike ASP .Net Web Controls 5 03-24-2006 01:27 AM
Bug in DataGrid - ItemCommand event does not fire for ButtonColumnif ButtonType="PushButton" Nick Gilbert ASP .Net 2 12-15-2003 08:10 AM
Solving DataGrid's PushButton Problem Curtis Hatter ASP .Net 1 10-17-2003 09:41 PM
PushButton v. LinkButton in a DataGrid Mark ASP .Net 1 07-03-2003 05:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57