Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 24th, 2006, 04:26 AM
Authorized User
Join Date: Aug 2006
Location: Mumbai, Maharastra, India.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default calling javascript as well as codebehind code

hi friends

i have one datagrid in which i have one linkbutton
on click event of this link button i want to show one pop up
in pop up i am showing one image
this image will be change as per link buttons text
for that i write one public method
in which i am changing the image which is in server as per linkbuttons text

now i want to show this image is in another popup form /window
for that i write one javascript

how can i call this javascript from the public method which i have written for changing images

or any other method by wchich i can show popup window

please remember i want ot run codebehind as well as javascript
from datagrids linkbutton click event


Reply With Quote
  #2 (permalink)  
Old November 27th, 2006, 08:47 AM
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

You can simple use "RegisterStartupScript" to run javascript from code behind page. eg.
code in page.aspx.cs would be something like this...

string strScript = "<script language=JavaScript> alert('hi')</Script>";

Hope this may help

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
calling javascript as well as codebehind code k.manisha ASP.NET 1.0 and 1.1 Professional 1 November 25th, 2006 01:19 PM
calling javascript as well as codebehind code k.manisha ASP.NET 1.x and 2.0 Application Design 0 November 24th, 2006 04:28 AM
javascript as well as codebehind code k.manisha .NET Framework 1.x 0 November 24th, 2006 04:23 AM
calling a codebehind function on onblur event vishnupriya.kamalakaram ASP.NET 1.0 and 1.1 Basics 2 July 7th, 2006 08:25 AM
Calling codebehind C# function from aspx page ravindrasingh77 BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 16th, 2005 12:08 AM

All times are GMT -4. The time now is 05:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.