Solved

how to write javascript inside c#(URGENT)

Posted on 2004-04-02
3
3,921 Views
Last Modified: 2007-12-19
my javascript doesnt work inside c# using asp.net anyone have a verygood example using javascript inside a c# class its very urgent
thanx alot
0
Comment
Question by:loopholes
3 Comments
 
LVL 2

Accepted Solution

by:
pippothegreat earned 500 total points
Comment Utility
im also doing this
heres the code i know how it feels to be in a hurry so ill give you something easy and working.

String strJava = "<script language=JavaScript> ";
        strJava += "do your coding here (everything that was in double quotes are now in single)"      
    strJava += "</";        <-----make sure that its in two seperate lines
    strJava += "script>";  <-----""

        if(!this.IsStartupScriptRegistered("Startup"))
      this.RegisterStartupScript("Startup", strJava);
0
 

Author Comment

by:loopholes
Comment Utility
thanks alot pippothegreat i need this badly
0
 

Expert Comment

by:trubes1244
Comment Utility
Is it possible to put this code in a class file?
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now