Solved

how to write javascript inside c#(URGENT)

Posted on 2004-04-02
3
3,958 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
pippothegreat earned 500 total points
ID: 10743823
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
ID: 10744148
thanks alot pippothegreat i need this badly
0
 

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 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