I have the following script :
<script type="text/javascript"src = "//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/100080069921643878012/facebook.xml&up_useNewFB_p=1&up_showPopUp2_p=true&synd=open&w=320&h=500&title=Facebook&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
to use the igoogle gadget .
I execute this script in run time through the following code :
HtmlGenericControl div_general_ac = new HtmlGenericControl("div");
StringBuilder str = new StringBuilder();
str.Append("<script type=\"text/javascript\"");
str.Append("src = '" + dt_list.ElementAtOrDefault(0).Field<string>("process_url") + "'" + "></");
str.Append("script>");
ClientScript.RegisterStartupScript(this.GetType(), "rowTest", str.ToString());
return div_general_ac;
Everything goes okay. The gadget is created but not in div_general_ac
. I want to execute the script in the div.
From MSDN:
The main difference is that the RegisterStartupScript method places the JavaScript at the bottom of the ASP.NET page right before the closing element. The RegisterClientScriptBlock method places the JavaScript directly after the opening element in the page.
I want the script in specific place not in the top or the bottom.