We have your asp .net ajax web controls but do not have your Sharepoint controls. It looks like we will get them sometime after October of this year. In the mean time how do I call javascript from a SharePoint WebPart. The WebPart is just a user defined control ascx file. Where do I register the script section and where do I put the functions?
I was told:
I tried this but could not add the function to a button control. Can you help?
Thanks,
Steve Holdorf
I was told:
You can create a Litral control and set the Text property, like following -
protected override void CreateChildControls()
{
Litral scriptLitral=new Litral();
scriptLitral.Text="<script type='text\javascript'>";
scriptLitral.Text+="function CustomAlert(msg){";
scriptLitral.Text+="alert(msg);}</script>";
Controls.Add(scriptLitral);
}
I tried this but could not add the function to a button control. Can you help?
Thanks,
Steve Holdorf