Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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


  #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

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

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