Hello All,
I have registered a javascript into my web application in C#.NET.
For some reason, this script is not getting executed.
Could you please help.
Here is the code i have written.
ClientScriptManager cs = Page.ClientScript;
string csname = "ButtonClickScript";
Type cstype = this.GetType();
StringBuilder cstext = new StringBuilder();
if (!cs.IsClientScriptBlockRegistered(cstype, csname))
{
cstext.Append("function Shape(){");
cstext.Append(" map = new VEMap('myMap');");
cstext.Append("map.LoadMap();");
cstext.Append("var routeLine = new VEShape(VEShapeType.Polyline,['" + GlobalVariables.displaypoints + "']);");
cstext.Append("map.AddShape(routeline);}");
}
Page.ClientScript.RegisterClientScriptBlock(this.G etType(), "ButtonClickScript", cstext.ToString(), true);
Button1.Attributes.Add("onClick","return Shape();");
Waiting desperately for the reply.
Thanks.