Link to home
Start Free TrialLog in
Avatar of samprg
samprg

asked on

Javascript injection

Hi,
I am trying to inject javasript from codebehind:

StringBuilder sb = new StringBuilder();
            sb.Append("<script language=javascript>\n");
             .
             .
             .
           sb.Append("</script>\n");  
But I get error in    Page.RegisterClientsideScript("script ", sb.ToString());
Avatar of themrrobert
themrrobert
Flag of United States of America image

What is the error you are receiving?
ASKER CERTIFIED SOLUTION
Avatar of themrrobert
themrrobert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of samprg
samprg

ASKER

System.Web.UI.Page' does not contain a definition for 'RegisterClientsideScript' and no extension method 'RegisterClientsideScript' accepting a first argument of type 'System.Web.UI.Page' could be found (are you missing a using directive or an assembly reference?)
Avatar of samprg

ASKER

No error but  my javascript does not work, I wen to View Source I found it under "<form..."
Avatar of samprg

ASKER

Awesome