Solved

how to write javascript inside c#(URGENT)

Posted on 2004-04-02
3
3,962 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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

691 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