Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Kiswar Malik   on May 25 In Asp.net Category.

Question Answered By: Edna West   on May 25

don't know if it helps but I've just done something similar(ish) ... I had a
class for a large jscript and simply wrote to a label.

namespace yournamespace{
using System;
public class JScript
private string str = "";

public JScript()
public string getjs()
str +="\n";
str +=" <SCRIPT language=\"javascript\">\n";
str +="<!--\n";
str +=" ......... blah blah blah\n";
str +="-->\n";
str +=" </SCRIPT>\n";
return str;


Label mylabel = new Label();
JScript myjs = new JScript()
mylabel.Text = myjs.getjs();

Not quite the same as what you want but it works ... and you can pass it
parameters if you wanted.